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

Unified Diff: skia/ext/bitmap_platform_device_mac.cc

Issue 11418217: Add skia::RefPtr class to wrap ref counted classes from Skia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Drop TNoRef Created 8 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698