Index: skia/ext/bitmap_platform_device_mac.cc |
diff --git a/skia/ext/bitmap_platform_device_mac.cc b/skia/ext/bitmap_platform_device_mac.cc |
index 06a41390b5db0dc44810b7a373df9537238a49bf..bf02a89a5e1bc31b930023fba91183325c104c35 100644 |
--- a/skia/ext/bitmap_platform_device_mac.cc |
+++ b/skia/ext/bitmap_platform_device_mac.cc |
@@ -260,16 +260,22 @@ SkBaseDevice* BitmapPlatformDevice::onCreateDevice(const CreateInfo& cinfo, |
// PlatformCanvas impl |
-SkCanvas* CreatePlatformCanvas(CGContextRef ctx, int width, int height, |
- bool is_opaque, OnFailureType failureType) { |
+std::unique_ptr<SkCanvas> CreatePlatformCanvas(CGContextRef ctx, |
+ int width, |
+ int height, |
+ bool is_opaque, |
+ OnFailureType failureType) { |
const bool do_clear = false; |
sk_sp<SkBaseDevice> dev( |
BitmapPlatformDevice::Create(ctx, width, height, is_opaque, do_clear)); |
return CreateCanvas(dev, failureType); |
} |
-SkCanvas* CreatePlatformCanvas(int width, int height, bool is_opaque, |
- uint8_t* data, OnFailureType failureType) { |
+std::unique_ptr<SkCanvas> CreatePlatformCanvas(int width, |
+ int height, |
+ bool is_opaque, |
+ uint8_t* data, |
+ OnFailureType failureType) { |
sk_sp<SkBaseDevice> dev( |
BitmapPlatformDevice::CreateWithData(data, width, height, is_opaque)); |
return CreateCanvas(dev, failureType); |