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

Unified Diff: skia/ext/vector_canvas.cc

Issue 6665046: Unfork VectorPlatformCanvas. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 9 months 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/vector_canvas.h ('k') | skia/ext/vector_canvas_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/ext/vector_canvas.cc
diff --git a/skia/ext/vector_canvas.cc b/skia/ext/vector_canvas.cc
index 851da79cac7d31557961b64f934021d7d25ec688..0ce4a2c8e1167247119f5b0782845a3bd1ea7c39 100644
--- a/skia/ext/vector_canvas.cc
+++ b/skia/ext/vector_canvas.cc
@@ -4,13 +4,14 @@
#include "skia/ext/vector_canvas.h"
-namespace skia {
+#include "skia/ext/vector_platform_device.h"
-VectorCanvas::VectorCanvas()
- : PlatformCanvas(SkNEW(VectorPlatformDeviceFactory)) {
-}
+namespace skia {
-VectorCanvas::VectorCanvas(SkDeviceFactory* factory) : PlatformCanvas(factory) {
+VectorCanvas::VectorCanvas(PlatformDevice* device)
+ : PlatformCanvas(device->getDeviceFactory()) {
+ setDevice(device);
reed1 2011/03/17 20:06:53 standard pattern is this->setDevice(device)->unre
+ device->unref(); // was created with refcount 1, and setDevice also refs
}
VectorCanvas::~VectorCanvas() {
« no previous file with comments | « skia/ext/vector_canvas.h ('k') | skia/ext/vector_canvas_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698