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

Unified Diff: skia/ext/vector_canvas.cc

Issue 6665046: Unfork VectorPlatformCanvas. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Copyright years 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
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);
+ device->unref(); // was created with refcount 1, and setDevice also refs
}
VectorCanvas::~VectorCanvas() {

Powered by Google App Engine
This is Rietveld 408576698