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); |
}; |