diff options
Diffstat (limited to 'bench/DeferredCanvasBench.cpp')
-rw-r--r-- | bench/DeferredCanvasBench.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bench/DeferredCanvasBench.cpp b/bench/DeferredCanvasBench.cpp index 15902b9f58..a1a3901632 100644 --- a/bench/DeferredCanvasBench.cpp +++ b/bench/DeferredCanvasBench.cpp @@ -26,8 +26,12 @@ protected: } virtual void onDraw(SkCanvas* canvas) { - SkDeferredCanvas deferredCanvas(canvas->getDevice()->createCompatibleDevice( - SkBitmap::kARGB_8888_Config, CANVAS_WIDTH, CANVAS_HEIGHT, false)); + SkDevice *device = canvas->getDevice()->createCompatibleDevice( + SkBitmap::kARGB_8888_Config, CANVAS_WIDTH, CANVAS_HEIGHT, false); + + SkDeferredCanvas deferredCanvas(device); + + device->unref(); initDeferredCanvas(deferredCanvas); |