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 c97e6fbdd42b010dc80abb6d8d44b7f84be90d8b..543d62a2ee469dc0ba40a2b6feb464a6bf76e4cd 100644 |
--- a/skia/ext/bitmap_platform_device_mac.cc |
+++ b/skia/ext/bitmap_platform_device_mac.cc |
@@ -202,7 +202,6 @@ BitmapPlatformDevice::BitmapPlatformDevice( |
} |
BitmapPlatformDevice::~BitmapPlatformDevice() { |
- data_->unref(); |
} |
CGContextRef BitmapPlatformDevice::GetBitmapContext() { |
@@ -265,14 +264,15 @@ SkDevice* BitmapPlatformDevice::onCreateCompatibleDevice( |
SkCanvas* CreatePlatformCanvas(CGContextRef ctx, int width, int height, |
bool is_opaque, OnFailureType failureType) { |
- SkDevice* dev = BitmapPlatformDevice::Create(ctx, width, height, is_opaque); |
+ skia::RefPtr<SkDevice> dev = |
+ BitmapPlatformDevice::Create(ctx, width, height, is_opaque); |
return CreateCanvas(dev, failureType); |
} |
SkCanvas* CreatePlatformCanvas(int width, int height, bool is_opaque, |
uint8_t* data, OnFailureType failureType) { |
- SkDevice* dev = BitmapPlatformDevice::CreateWithData(data, width, height, |
- is_opaque); |
+ skia::RefPtr<SkDevice> dev = |
+ BitmapPlatformDevice::CreateWithData(data, width, height, is_opaque); |
return CreateCanvas(dev, failureType); |
} |