diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-01 17:54:05 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-10-01 17:54:05 +0000 |
commit | 44a42ea8b22a845a419b8ae3b47c4619fdec0215 (patch) | |
tree | 8b53d792fd9a01190c1830a8afdcb8fd3b11437f /tests/PremulAlphaRoundTripTest.cpp | |
parent | 0ab7c77a2c964f90338ef314ce04e4f9a05d45b4 (diff) |
1. remove references to (deprecated) SkGpuCanvas
2. remove references to setDevice (soon to be deprecated)
Review URL: https://codereview.appspot.com/6597055
git-svn-id: http://skia.googlecode.com/svn/trunk@5751 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/PremulAlphaRoundTripTest.cpp')
-rw-r--r-- | tests/PremulAlphaRoundTripTest.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/PremulAlphaRoundTripTest.cpp b/tests/PremulAlphaRoundTripTest.cpp index f2f1613d95..17fb42a41c 100644 --- a/tests/PremulAlphaRoundTripTest.cpp +++ b/tests/PremulAlphaRoundTripTest.cpp @@ -48,24 +48,25 @@ static const SkCanvas::Config8888 gUnpremulConfigs[] = { void PremulAlphaRoundTripTest(skiatest::Reporter* reporter, GrContext* context) { - SkCanvas canvas; + SkAutoTUnref<SkDevice> device; for (int dtype = 0; dtype < 2; ++dtype) { if (0 == dtype) { - canvas.setDevice(new SkDevice(SkBitmap::kARGB_8888_Config, + device.reset(new SkDevice(SkBitmap::kARGB_8888_Config, 256, 256, - false))->unref(); + false)); } else { #if !SK_SUPPORT_GPU || defined(SK_SCALAR_IS_FIXED) // GPU device known not to work in the fixed pt build. continue; #else - canvas.setDevice(new SkGpuDevice(context, + device.reset(new SkGpuDevice(context, SkBitmap::kARGB_8888_Config, 256, - 256))->unref(); + 256)); #endif } + SkCanvas canvas(device); SkBitmap readBmp1; readBmp1.setConfig(SkBitmap::kARGB_8888_Config, 256, 256); |