From 99180756367573f1d741a5104ed401c5a7308ae9 Mon Sep 17 00:00:00 2001 From: Derek Sollenberger Date: Thu, 16 Aug 2012 15:08:47 -0400 Subject: Ensure SkCanvas will have a device by default. bug: 6987261 Change-Id: I8cb5b6da2347a1fa88a13aa3548312a7773831e5 --- src/core/SkCanvas.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 7861636..0e26728 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -425,7 +425,8 @@ SkCanvas::SkCanvas() : fMCStack(sizeof(MCRec), fMCRecStorage, sizeof(fMCRecStorage)) { inc_canvas(); - this->init(NULL); + SkBitmap bitmap; + this->init(SkNEW_ARGS(SkDevice, (bitmap)))->unref(); } SkCanvas::SkCanvas(SkDevice* device) -- cgit v1.1