Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Unified Diff: skia/ext/platform_canvas.cc

Issue 6064007: Allow the creation of a skia::PlatformCanvas from a CGContextRef. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed changes to webmediaplayer_impl.cc Created 9 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « skia/ext/platform_canvas.h ('k') | skia/ext/platform_canvas_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_canvas.cc
diff --git a/skia/ext/platform_canvas.cc b/skia/ext/platform_canvas.cc
index 44b0d161e380ae4d0625c6ede684a01e3be3ab8f..b3577e56cb8e76d38810e5e8aacb9711dae0cc1b 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
« no previous file with comments | « skia/ext/platform_canvas.h ('k') | skia/ext/platform_canvas_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698