fix FM svg harness
Without this we'd assert on empty container size. Change-Id: I697d607af40ac6e62039be33aedb8ff1732d41b8 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/364839 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
f57207bfaf
commit
d1131b6aa0
@ -179,8 +179,10 @@ static void init(Source* source, std::shared_ptr<SkCodec> codec) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void init(Source* source, sk_sp<SkSVGDOM> svg) {
|
static void init(Source* source, sk_sp<SkSVGDOM> svg) {
|
||||||
source->size = svg->containerSize().isEmpty() ? SkISize{1000,1000}
|
if (svg->containerSize().isEmpty()) {
|
||||||
: svg->containerSize().toCeil();
|
svg->setContainerSize({1000,1000});
|
||||||
|
}
|
||||||
|
source->size = svg->containerSize().toCeil();
|
||||||
source->draw = [svg](SkCanvas* canvas) {
|
source->draw = [svg](SkCanvas* canvas) {
|
||||||
svg->render(canvas);
|
svg->render(canvas);
|
||||||
return ok;
|
return ok;
|
||||||
|
Loading…
Reference in New Issue
Block a user