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 { |