Index: skia/ext/vector_canvas.cc |
diff --git a/skia/ext/vector_canvas.cc b/skia/ext/vector_canvas.cc |
index 851da79cac7d31557961b64f934021d7d25ec688..216a2ee433a85ed981f258a8861ada36ae5000a0 100644 |
--- a/skia/ext/vector_canvas.cc |
+++ b/skia/ext/vector_canvas.cc |
@@ -4,13 +4,13 @@ |
#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)->unref(); // Created with refcount 1, and setDevice refs. |
} |
VectorCanvas::~VectorCanvas() { |