[skottie] Handle empty lines in Shaper
SkShaper doesn't seem to like empty inputs. TBR= Change-Id: Iace3eef389051dcce229ed4ac6897344770d19c3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/224190 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org> Auto-Submit: Florin Malita <fmalita@chromium.org>
This commit is contained in:
parent
c29e6dc358
commit
c1f5d8d0f4
@ -159,6 +159,14 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
SkASSERT(start <= end);
|
||||
if (start == end) {
|
||||
// SkShaper doesn't care for empty lines.
|
||||
this->beginLine();
|
||||
this->commitLine();
|
||||
return;
|
||||
}
|
||||
|
||||
// When no text box is present, text is laid out on a single infinite line
|
||||
// (modulo explicit line breaks).
|
||||
const auto shape_width = fBox.isEmpty() ? SK_ScalarMax
|
||||
|
Loading…
Reference in New Issue
Block a user