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

Unified Diff: experimental/svg/model/SkSVGDOM.h

Issue 2164193002: Initial SVG model (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: warning fix Created 4 years, 5 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 | « experimental/svg/model/SkSVGContainer.cpp ('k') | experimental/svg/model/SkSVGDOM.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/svg/model/SkSVGDOM.h
diff --git a/experimental/svg/model/SkSVGDOM.h b/experimental/svg/model/SkSVGDOM.h
new file mode 100644
index 0000000000000000000000000000000000000000..468ac00a9092b25c995be322f0f962b45a84ede9
--- /dev/null
+++ b/experimental/svg/model/SkSVGDOM.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkSVGDOM_DEFINED
+#define SkSVGDOM_DEFINED
+
+#include "SkRefCnt.h"
+#include "SkSize.h"
+#include "SkTemplates.h"
+
+class SkCanvas;
+class SkDOM;
+class SkStream;
+class SkSVGNode;
+
+class SkSVGDOM : public SkRefCnt {
+public:
+ SkSVGDOM(const SkSize& containerSize);
+ ~SkSVGDOM() = default;
+
+ static sk_sp<SkSVGDOM> MakeFromDOM(const SkDOM&, const SkSize& containerSize);
+ static sk_sp<SkSVGDOM> MakeFromStream(SkStream&, const SkSize& containerSize);
+
+ void setContainerSize(const SkSize&);
+
+ void render(SkCanvas*) const;
+
+private:
+ SkSize fContainerSize;
+ sk_sp<SkSVGNode> fRoot;
+
+ typedef SkRefCnt INHERITED;
+};
+
+#endif // SkSVGDOM_DEFINED
« no previous file with comments | « experimental/svg/model/SkSVGContainer.cpp ('k') | experimental/svg/model/SkSVGDOM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698