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

Unified Diff: skia/ext/platform_canvas.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: 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/platform_canvas.h
diff --git a/skia/ext/platform_canvas.h b/skia/ext/platform_canvas.h
index c83e6bf69f6ad07676848a9e4044064a5de87bdb..d906012d0a18d6bfc8e0a58a436a9c47360daee1 100644
--- a/skia/ext/platform_canvas.h
+++ b/skia/ext/platform_canvas.h
@@ -9,6 +9,7 @@
// to get the surface type.
#include "base/basictypes.h"
#include "skia/ext/platform_device.h"
+#include "skia/ext/refptr.h"
#include "third_party/skia/include/core/SkCanvas.h"
namespace skia {
@@ -71,8 +72,8 @@ static inline SkCanvas* CreatePlatformCanvas(int width,
return CreatePlatformCanvas(width, height, is_opaque, 0, CRASH_ON_FAILURE);
}
-// Takes ownership of the device, so the caller need not call unref().
-SK_API SkCanvas* CreateCanvas(SkDevice* device, OnFailureType failure_type);
+SK_API SkCanvas* CreateCanvas(const skia::RefPtr<SkDevice>& device,
+ OnFailureType failure_type);
static inline SkCanvas* CreateBitmapCanvas(int width,
int height,

Powered by Google App Engine
This is Rietveld 408576698