summaryrefslogtreecommitdiffstats
path: root/skia/ext/platform_canvas.cc
diff options
context:
space:
mode:
Diffstat (limited to 'skia/ext/platform_canvas.cc')
-rw-r--r--skia/ext/platform_canvas.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/skia/ext/platform_canvas.cc b/skia/ext/platform_canvas.cc
index 44b0d16..b3577e5 100644
--- a/skia/ext/platform_canvas.cc
+++ b/skia/ext/platform_canvas.cc
@@ -32,4 +32,13 @@ size_t PlatformCanvas::StrideForWidth(unsigned width) {
return 4 * width;
}
+bool PlatformCanvas::initializeWithDevice(SkDevice* device) {
+ if (!device)
+ return false;
+
+ setDevice(device);
+ device->unref(); // Was created with refcount 1, and setDevice also refs.
+ return true;
+}
+
} // namespace skia