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

Unified Diff: skia/ext/bitmap_platform_device_mac.h

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: match linux 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.h
diff --git a/skia/ext/bitmap_platform_device_mac.h b/skia/ext/bitmap_platform_device_mac.h
index 0d00a0abb5d4ca0707f545a776ed7ec852048361..a1c5894086e056e5b253e24a2bbc42080bb18ab7 100644
--- a/skia/ext/bitmap_platform_device_mac.h
+++ b/skia/ext/bitmap_platform_device_mac.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "skia/ext/platform_device.h"
+#include "skia/ext/refptr.h"
namespace skia {
@@ -64,7 +65,7 @@ class SK_API BitmapPlatformDevice : public SkDevice, public PlatformDevice {
// bitmaps used by the base device class are already refcounted and copyable.
class BitmapPlatformDeviceData;
- BitmapPlatformDevice(BitmapPlatformDeviceData* data,
+ BitmapPlatformDevice(const skia::RefPtr<BitmapPlatformDeviceData>& data,
const SkBitmap& bitmap);
// Flushes the CoreGraphics context so that the pixel data can be accessed
@@ -76,9 +77,8 @@ class SK_API BitmapPlatformDevice : public SkDevice, public PlatformDevice {
int height, bool isOpaque,
Usage usage) OVERRIDE;
- // Data associated with this device, guaranteed non-null. We hold a reference
- // to this object.
- BitmapPlatformDeviceData* data_;
+ // Data associated with this device, guaranteed non-null.
+ skia::RefPtr<BitmapPlatformDeviceData> data_;
DISALLOW_COPY_AND_ASSIGN(BitmapPlatformDevice);
};

Powered by Google App Engine
This is Rietveld 408576698