Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: src/gpu/GrAtlasTextContext.cpp

Issue 1103243002: fix a bug in scrolling BitmapText gpu cached textblobs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrAtlasTextContext.h ('k') | src/gpu/GrTextBlobCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextContext.cpp
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index 56ad9d2d998430f97ab0d5ab9cb6f2dc733cb595..8e4b6635a375efb6c497c75ebb7395793b6e04f2 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -307,23 +307,10 @@ bool GrAtlasTextContext::MustRegenerateBlob(SkScalar* outTransX, SkScalar* outTr
viewMatrix.getSkewY() * (x - blob.fX) +
viewMatrix.getScaleY() * (y - blob.fY) -
blob.fViewMatrix.getTranslateY();
- if (SkScalarFraction(transX) > SK_ScalarNearlyZero ||
- SkScalarFraction(transY) > SK_ScalarNearlyZero) {
+ if (!SkScalarIsInt(transX) || !SkScalarIsInt(transY) ) {
return true;
}
-#ifdef SK_DEBUG
- static const SkScalar kMinDiscernableTranslation = 0.0625;
- // As a safeguard when debugging, we store the total error across all translations and print
- // if the error becomes discernable. This is pretty unlikely to occur given the tight
- // bounds above on translation
- blob.fTotalXError += SkScalarAbs(SkScalarFraction(transX));
- blob.fTotalYError += SkScalarAbs(SkScalarFraction(transY));
- if (blob.fTotalXError > kMinDiscernableTranslation ||
- blob.fTotalYError > kMinDiscernableTranslation) {
- SkDebugf("Exceeding error threshold for bitmap text translation");
- }
-#endif
(*outTransX) = transX;
(*outTransY) = transY;
} else if (blob.hasDistanceField()) {
« no previous file with comments | « src/gpu/GrAtlasTextContext.h ('k') | src/gpu/GrTextBlobCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698