diff options
Diffstat (limited to 'tests/ReadWriteAlphaTest.cpp')
-rw-r--r-- | tests/ReadWriteAlphaTest.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp index 751c9128c4..eea78ce6c0 100644 --- a/tests/ReadWriteAlphaTest.cpp +++ b/tests/ReadWriteAlphaTest.cpp @@ -77,9 +77,8 @@ static void ReadWriteAlphaTest(skiatest::Reporter* reporter, GrContext* context) REPORTER_ASSERT(reporter, match); // Now try writing on the single channel texture - SkCanvas canvas; - - canvas.setDevice(new SkGpuDevice(context, texture->asRenderTarget()))->unref(); + SkAutoTUnref<SkDevice> device(new SkGpuDevice(context, texture->asRenderTarget())); + SkCanvas canvas(device); SkPaint paint; |