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

Unified Diff: skia/ext/vector_canvas.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/vector_canvas.cc
diff --git a/skia/ext/vector_canvas.cc b/skia/ext/vector_canvas.cc
index 96c23e92c372fc805d21423cefcacde2fe759986..6865e85fbbe85bfb52651242d80d3ea4aa9347c6 100644
--- a/skia/ext/vector_canvas.cc
+++ b/skia/ext/vector_canvas.cc
@@ -7,8 +7,8 @@
namespace skia {
-VectorCanvas::VectorCanvas(SkDevice* device) {
- setDevice(device)->unref(); // Created with refcount 1, and setDevice refs.
+VectorCanvas::VectorCanvas(const skia::RefPtr<SkDevice>& device) {
+ setDevice(device.get());
}
VectorCanvas::~VectorCanvas() {

Powered by Google App Engine
This is Rietveld 408576698