[skottie] Fix text error logging
Don't clear the logger until we actually see some errors. Change-Id: I275e99a6f2748dff1456a471daabb142fd1a10f2 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/500996 Auto-Submit: Florin Malita <fmalita@chromium.org> Reviewed-by: Jorge Betancourt <jmbetancourt@google.com> Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
This commit is contained in:
parent
2cf4863add
commit
e3ecc34f01
@ -472,6 +472,10 @@ void TextAdapter::reshape() {
|
|||||||
const auto msg = SkStringPrintf("Text layout failed for '%s'.",
|
const auto msg = SkStringPrintf("Text layout failed for '%s'.",
|
||||||
fText->fText.c_str());
|
fText->fText.c_str());
|
||||||
fLogger->log(Logger::Level::kError, msg.c_str());
|
fLogger->log(Logger::Level::kError, msg.c_str());
|
||||||
|
|
||||||
|
// These may trigger repeatedly when the text is animating.
|
||||||
|
// To avoid spamming, only log once.
|
||||||
|
fLogger = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shape_result.fMissingGlyphCount > 0) {
|
if (shape_result.fMissingGlyphCount > 0) {
|
||||||
@ -479,11 +483,8 @@ void TextAdapter::reshape() {
|
|||||||
shape_result.fMissingGlyphCount,
|
shape_result.fMissingGlyphCount,
|
||||||
fText->fText.c_str());
|
fText->fText.c_str());
|
||||||
fLogger->log(Logger::Level::kWarning, msg.c_str());
|
fLogger->log(Logger::Level::kWarning, msg.c_str());
|
||||||
|
fLogger = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// These may trigger repeatedly when the text is animating.
|
|
||||||
// To avoid spamming, only log once.
|
|
||||||
fLogger = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rebuild all fragments.
|
// Rebuild all fragments.
|
||||||
|
Loading…
Reference in New Issue
Block a user