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

Unified Diff: ui/surface/transport_dib_win.cc

Issue 2509983004: Revert "Change call-sites now that SkCanvas is not ref-counted" (Closed)
Patch Set: Created 4 years, 1 month 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') | ui/views/border_unittest.cc » ('j') | 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..190065b9ded3acff714154ce7456a7362b218fb6 100644
--- a/ui/surface/transport_dib_win.cc
+++ b/ui/surface/transport_dib_win.cc
@@ -58,9 +58,8 @@ bool TransportDIB::is_valid_handle(Handle dib) {
return dib.IsValid();
}
-std::unique_ptr<SkCanvas> TransportDIB::GetPlatformCanvas(int w,
- int h,
- bool opaque) {
+SkCanvas* TransportDIB::GetPlatformCanvas(int w, int h,
+ bool opaque) {
// This DIB already mapped the file into this process, but PlatformCanvas
// will map it again.
DCHECK(!memory()) << "Mapped file twice in the same process.";
@@ -68,7 +67,7 @@ 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(
+ SkCanvas* canvas = skia::CreatePlatformCanvas(
w, h, opaque, shared_memory_.handle().GetHandle(),
skia::RETURN_NULL_ON_FAILURE);
« no previous file with comments | « ui/surface/transport_dib_posix.cc ('k') | ui/views/border_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698