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

Unified Diff: skia/ext/platform_canvas_linux.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.cc ('k') | skia/ext/platform_canvas_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_canvas_linux.cc
diff --git a/skia/ext/platform_canvas_linux.cc b/skia/ext/platform_canvas_linux.cc
index 8e9db6247994b5821767cd2a490f2fb99ed87070..5d3594e6056a1e73ae25da1adbff1f79ba374ec4 100644
--- a/skia/ext/platform_canvas_linux.cc
+++ b/skia/ext/platform_canvas_linux.cc
@@ -29,14 +29,8 @@ PlatformCanvas::~PlatformCanvas() {
}
bool PlatformCanvas::initialize(int width, int height, bool is_opaque,
uint8_t* data) {
- SkDevice* device =
- BitmapPlatformDevice::Create(width, height, is_opaque, data);
- if (!device)
- return false;
-
- setDevice(device);
- device->unref(); // was created with refcount 1, and setDevice also refs
- return true;
+ return initializeWithDevice(BitmapPlatformDevice::Create(
+ width, height, is_opaque, data));
}
cairo_t* PlatformCanvas::beginPlatformPaint() {
« no previous file with comments | « skia/ext/platform_canvas.cc ('k') | skia/ext/platform_canvas_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698