Fix logic error for GrTextBlob mustRegen
Change-Id: I2f08a3d26f411ef34d964a8f324696e97e8970ed
Reviewed-on: https://skia-review.googlesource.com/c/163162
Commit-Queue: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
diff --git a/src/gpu/text/GrTextBlob.cpp b/src/gpu/text/GrTextBlob.cpp
index 6249c3a..d96e046 100644
--- a/src/gpu/text/GrTextBlob.cpp
+++ b/src/gpu/text/GrTextBlob.cpp
@@ -196,8 +196,10 @@
return true;
}
- if (!anyRunHasSubpixelPosition) {
- // We can update the positions in the cachedtextblobs without regenerating the whole
+ // If the text blob only has full pixel glyphs, then fractional part of the position does
+ // not affect the SkGlyphs used.
+ if (anyRunHasSubpixelPosition) {
+ // We can update the positions in the text blob without regenerating the whole
// blob, but only for integer translations.
// This cool bit of math will determine the necessary translation to apply to the
// already generated vertex coordinates to move them to the correct position.