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

Unified Diff: ui/surface/transport_dib_win.cc

Issue 2595023002: clean-up and clarify CreatePlatformCanvas methods (Closed)
Patch Set: single decl of CreatePlatformCanvasWithPixels Created 4 years 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 | « ui/surface/transport_dib_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/surface/transport_dib_win.cc
diff --git a/ui/surface/transport_dib_win.cc b/ui/surface/transport_dib_win.cc
index 61f5a1b24295e639effc3650bed1965dd05d828f..f845480620fb0ad3033ab6de318217bdc2bf560a 100644
--- a/ui/surface/transport_dib_win.cc
+++ b/ui/surface/transport_dib_win.cc
@@ -68,9 +68,10 @@ std::unique_ptr<SkCanvas> TransportDIB::GetPlatformCanvas(int w,
// We can't check the canvas size before mapping, but it's safe because
// Windows will fail to map the section if the dimensions of the canvas
// are too large.
- std::unique_ptr<SkCanvas> canvas = skia::CreatePlatformCanvas(
- w, h, opaque, shared_memory_.handle().GetHandle(),
- skia::RETURN_NULL_ON_FAILURE);
+ std::unique_ptr<SkCanvas> canvas =
+ skia::CreatePlatformCanvasWithSharedSection(
+ w, h, opaque, shared_memory_.handle().GetHandle(),
+ skia::RETURN_NULL_ON_FAILURE);
// Calculate the size for the memory region backing the canvas.
if (canvas)
« no previous file with comments | « ui/surface/transport_dib_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698