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

Unified Diff: skia/ext/platform_canvas_win.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_mac.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/platform_canvas_win.cc
diff --git a/skia/ext/platform_canvas_win.cc b/skia/ext/platform_canvas_win.cc
index 1c9f4610c7eb75701f1cf340366eb1b168a01023..e761ceea5bebf82a94a094dbd3a5a3f3dfa78098 100644
--- a/skia/ext/platform_canvas_win.cc
+++ b/skia/ext/platform_canvas_win.cc
@@ -67,7 +67,7 @@ void CrashForBitmapAllocationFailure(int w, int h) {
// Crashes the process. This is called when a bitmap allocation fails but
// unlike its cousin CrashForBitmapAllocationFailure() it tries to detect if
-// the issue was a non-valid shared bitmap handle.
+// the issue was a non-valid shared bitmap handle.
void CrashIfInvalidSection(HANDLE shared_section) {
DWORD handle_info = 0;
CHECK(::GetHandleInformation(shared_section, &handle_info) == TRUE);
@@ -102,14 +102,8 @@ bool PlatformCanvas::initialize(int width,
int height,
bool is_opaque,
HANDLE shared_section) {
- SkDevice* device = BitmapPlatformDevice::create(width, height,
- is_opaque, shared_section);
- 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, shared_section));
}
HDC PlatformCanvas::beginPlatformPaint() {
« no previous file with comments | « skia/ext/platform_canvas_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698