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

Unified Diff: skia/ext/bitmap_platform_device_win.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: nit+rebase Created 8 years 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
« no previous file with comments | « skia/ext/bitmap_platform_device_mac.cc ('k') | skia/ext/bitmap_platform_device_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/bitmap_platform_device_win.h
diff --git a/skia/ext/bitmap_platform_device_win.h b/skia/ext/bitmap_platform_device_win.h
index 745ac10d68633d80ce99f4874aebcdb217e91051..c896c0aaae7655ed0c498ece444af50e47de74f1 100644
--- a/skia/ext/bitmap_platform_device_win.h
+++ b/skia/ext/bitmap_platform_device_win.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 {
@@ -79,13 +80,12 @@ class SK_API BitmapPlatformDevice : public SkDevice, public PlatformDevice {
// bitmaps used by the base device class are already refcounted and copyable.
class BitmapPlatformDeviceData;
- // Private constructor. The data should already be ref'ed for us.
- BitmapPlatformDevice(BitmapPlatformDeviceData* data,
+ // Private constructor.
+ BitmapPlatformDevice(const skia::RefPtr<BitmapPlatformDeviceData>& data,
const SkBitmap& bitmap);
- // 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_;
#ifdef SK_DEBUG
int begin_paint_count_;
« no previous file with comments | « skia/ext/bitmap_platform_device_mac.cc ('k') | skia/ext/bitmap_platform_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698