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

Unified Diff: src/svg/skp2svg.cpp

Issue 902583006: Add SkSVGCanvas (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: fix win warning Created 5 years, 10 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 | « src/svg/SkSVGDevice.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/svg/skp2svg.cpp
diff --git a/experimental/svg/skp2svg.cpp b/src/svg/skp2svg.cpp
similarity index 87%
rename from experimental/svg/skp2svg.cpp
rename to src/svg/skp2svg.cpp
index 95bb04a061ffbc465197114c6785942298f75778..ae6e54c8854ac2a209e27893a1ab4968f6cde14e 100644
--- a/experimental/svg/skp2svg.cpp
+++ b/src/svg/skp2svg.cpp
@@ -9,7 +9,8 @@
#include "SkCommandLineFlags.h"
#include "SkPicture.h"
#include "SkStream.h"
-#include "SkSVGDevice.h"
+#include "SkSVGCanvas.h"
+#include "SkXMLWriter.h"
DEFINE_string2(input, i, "", "input skp file");
DEFINE_string2(output, o, "", "output svg file (optional)");
@@ -54,11 +55,10 @@ int tool_main(int argc, char** argv) {
outStream.reset(SkNEW(SkDebugWStream));
}
- SkISize size = pic->cullRect().roundOut().size();
- SkAutoTUnref<SkBaseDevice> svgDevice(SkSVGDevice::Create(size, outStream));
- SkCanvas svgCanvas(svgDevice.get());
+ SkAutoTDelete<SkXMLWriter> xmlWriter(SkNEW_ARGS(SkXMLStreamWriter, (outStream.get())));
+ SkAutoTUnref<SkCanvas> svgCanvas(SkSVGCanvas::Create(pic->cullRect(), xmlWriter.get()));
- pic->playback(&svgCanvas);
+ pic->playback(svgCanvas);
return kSuccess;
}
« no previous file with comments | « src/svg/SkSVGDevice.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698