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

Unified Diff: samplecode/SampleSVGFile.cpp

Issue 2345533002: [SVGDom] Expose intrinsic size info (Closed)
Patch Set: private intrinsicSize() Created 4 years, 3 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/SkSVGSVG.cpp ('k') | samplecode/SampleSVGPong.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleSVGFile.cpp
diff --git a/samplecode/SampleSVGFile.cpp b/samplecode/SampleSVGFile.cpp
index a4b5b34d7d0d52a6fbb28628d886b7e97d1de6e3..61a6be73d60e2c82a6dbe72b2b66238209af9491 100644
--- a/samplecode/SampleSVGFile.cpp
+++ b/samplecode/SampleSVGFile.cpp
@@ -35,7 +35,10 @@ protected:
return;
}
- fDom = SkSVGDOM::MakeFromDOM(xmlDom, SkSize::Make(this->width(), this->height()));
+ fDom = SkSVGDOM::MakeFromDOM(xmlDom);
+ if (fDom) {
+ fDom->setContainerSize(SkSize::Make(this->width(), this->height()));
+ }
}
void onDrawContent(SkCanvas* canvas) override {
« no previous file with comments | « experimental/svg/model/SkSVGSVG.cpp ('k') | samplecode/SampleSVGPong.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698