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

Unified Diff: src/svg/SkSVGCanvas.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 | « include/svg/SkSVGCanvas.h ('k') | src/svg/SkSVGDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/svg/SkSVGCanvas.cpp
diff --git a/src/svg/SkSVGCanvas.cpp b/src/svg/SkSVGCanvas.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..22a6e0bd9c39f13af044f7324fde7b8dfa79ce46
--- /dev/null
+++ b/src/svg/SkSVGCanvas.cpp
@@ -0,0 +1,17 @@
+/*
+ * Copyright 2015 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "SkSVGCanvas.h"
+#include "SkSVGDevice.h"
+
+SkCanvas* SkSVGCanvas::Create(const SkRect& bounds, SkXMLWriter* writer) {
+ // TODO: pass full bounds to the device
+ SkISize size = bounds.roundOut().size();
+ SkAutoTUnref<SkBaseDevice> device(SkSVGDevice::Create(size, writer));
+
+ return SkNEW_ARGS(SkCanvas, (device));
+}
« no previous file with comments | « include/svg/SkSVGCanvas.h ('k') | src/svg/SkSVGDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698