aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2012-08-16 15:08:47 -0400
committerDerek Sollenberger <djsollen@google.com>2012-08-17 16:49:02 -0400
commit99180756367573f1d741a5104ed401c5a7308ae9 (patch)
treecdfeb40215669eae4f723ffd88230b14c5652ccb /src
parentfbb38cd17727043aa04957aa5edd7c9fec4d076a (diff)
downloadexternal_skia-99180756367573f1d741a5104ed401c5a7308ae9.zip
external_skia-99180756367573f1d741a5104ed401c5a7308ae9.tar.gz
external_skia-99180756367573f1d741a5104ed401c5a7308ae9.tar.bz2
Ensure SkCanvas will have a device by default.
bug: 6987261 Change-Id: I8cb5b6da2347a1fa88a13aa3548312a7773831e5
Diffstat (limited to 'src')
-rw-r--r--src/core/SkCanvas.cpp3
1 files changed, 2 insertions, 1 deletions
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)