Index: ui/surface/transport_dib_win.cc |
diff --git a/ui/surface/transport_dib_win.cc b/ui/surface/transport_dib_win.cc |
index 190065b9ded3acff714154ce7456a7362b218fb6..61f5a1b24295e639effc3650bed1965dd05d828f 100644 |
--- a/ui/surface/transport_dib_win.cc |
+++ b/ui/surface/transport_dib_win.cc |
@@ -58,8 +58,9 @@ bool TransportDIB::is_valid_handle(Handle dib) { |
return dib.IsValid(); |
} |
-SkCanvas* TransportDIB::GetPlatformCanvas(int w, int h, |
- bool opaque) { |
+std::unique_ptr<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."; |
@@ -67,7 +68,7 @@ SkCanvas* TransportDIB::GetPlatformCanvas(int w, int h, |
// 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. |
- SkCanvas* canvas = skia::CreatePlatformCanvas( |
+ std::unique_ptr<SkCanvas> canvas = skia::CreatePlatformCanvas( |
w, h, opaque, shared_memory_.handle().GetHandle(), |
skia::RETURN_NULL_ON_FAILURE); |