diff options
Diffstat (limited to 'samplecode/SampleTextureDomain.cpp')
| -rw-r--r-- | samplecode/SampleTextureDomain.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/samplecode/SampleTextureDomain.cpp b/samplecode/SampleTextureDomain.cpp index 07dcb40426..926a413a11 100644 --- a/samplecode/SampleTextureDomain.cpp +++ b/samplecode/SampleTextureDomain.cpp @@ -61,10 +61,10 @@ protected: // the constrainted texture domain. // Note: GPU-backed bitmaps follow a different rendering path // when copying from one GPU device to another. - SkRefPtr<SkDevice> primaryDevice(canvas->getDevice()); - SkRefPtr<SkDevice> secondDevice(canvas->createCompatibleDevice( + SkAutoTUnref<SkDevice> primaryDevice(canvas->getDevice()); + SkSafeRef(primaryDevice.get()); + SkAutoTUnref<SkDevice> secondDevice(canvas->createCompatibleDevice( SkBitmap::kARGB_8888_Config, 5, 5, true)); - secondDevice->unref(); SkCanvas secondCanvas(secondDevice.get()); srcRect.setXYWH(1, 1, 3, 3); |
