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

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

Issue 2222793002: [SVGDom] Add <svg> viewBox support (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: typo Created 4 years, 4 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/SkSVGRenderContext.cpp ('k') | experimental/svg/model/SkSVGSVG.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/svg/model/SkSVGSVG.h
diff --git a/experimental/svg/model/SkSVGSVG.h b/experimental/svg/model/SkSVGSVG.h
index 27631f5a3169c6c51b35e8eaec6b0688df1a1d60..ae4787cac3cee3f9ef17d2827033e8cfe5efa7c5 100644
--- a/experimental/svg/model/SkSVGSVG.h
+++ b/experimental/svg/model/SkSVGSVG.h
@@ -10,6 +10,7 @@
#include "SkSVGContainer.h"
#include "SkSVGTypes.h"
+#include "SkTLazy.h"
class SkSVGSVG : public SkSVGContainer {
public:
@@ -21,8 +22,11 @@ public:
void setY(const SkSVGLength&);
void setWidth(const SkSVGLength&);
void setHeight(const SkSVGLength&);
+ void setViewBox(const SkSVGViewBoxType&);
protected:
+ bool onPrepareToRender(SkSVGRenderContext*) const override;
+
void onSetAttribute(SkSVGAttribute, const SkSVGValue&) override;
private:
@@ -33,6 +37,8 @@ private:
SkSVGLength fWidth = SkSVGLength(100, SkSVGLength::Unit::kPercentage);
SkSVGLength fHeight = SkSVGLength(100, SkSVGLength::Unit::kPercentage);
+ SkTLazy<SkSVGViewBoxType> fViewBox;
+
typedef SkSVGContainer INHERITED;
};
« no previous file with comments | « experimental/svg/model/SkSVGRenderContext.cpp ('k') | experimental/svg/model/SkSVGSVG.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698