Remove unnecessary viewmatrix compare in GrAtlasTextContext
authorjoshualitt <joshualitt@chromium.org>
Thu, 23 Apr 2015 01:23:15 +0000 (18:23 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 23 Apr 2015 01:23:16 +0000 (18:23 -0700)
BUG=skia:

Review URL: https://codereview.chromium.org/1088903009

src/gpu/GrAtlasTextContext.cpp

index 5fbe2e3..ad56e89 100644 (file)
@@ -277,14 +277,13 @@ bool GrAtlasTextContext::MustRegenerateBlob(SkScalar* outTransX, SkScalar* outTr
         return true;
     }
 
-    // Identical viewmatrices and we can reuse in all cases
-    if (blob.fViewMatrix.cheapEqualTo(viewMatrix) && x == blob.fX && y == blob.fY) {
-        return false;
-    }
-
     // Mixed blobs must be regenerated.  We could probably figure out a way to do integer scrolls
     // for mixed blobs if this becomes an issue.
     if (blob.hasBitmap() && blob.hasDistanceField()) {
+        // Identical viewmatrices and we can reuse in all cases
+        if (blob.fViewMatrix.cheapEqualTo(viewMatrix) && x == blob.fX && y == blob.fY) {
+            return false;
+        }
         return true;
     }