return false;
}
- bool trivialMatrix = (inv.getType() & ~SkMatrix::kTranslate_Mask) == 0;
- bool clampClamp = SkShader::kClamp_TileMode == fTileModeX &&
- SkShader::kClamp_TileMode == fTileModeY;
-
- fInvMatrix = inv;
- if (!(clampClamp || trivialMatrix)) {
- fInvMatrix.postIDiv(fOrigBitmap.width(), fOrigBitmap.height());
- }
-
fBitmap = &fOrigBitmap;
+ fInvMatrix = inv;
// initialize our filter quality to the one requested by the caller.
// We may downgrade it later if we determine that we either don't need
this->possiblyScaleImage();
#endif
+ bool trivialMatrix = (fInvMatrix.getType() & ~SkMatrix::kTranslate_Mask) == 0;
+ bool clampClamp = SkShader::kClamp_TileMode == fTileModeX &&
+ SkShader::kClamp_TileMode == fTileModeY;
+
+ if (!(clampClamp || trivialMatrix)) {
+ fInvMatrix.postIDiv(fOrigBitmap.width(), fOrigBitmap.height());
+ }
+
// Now that all possible changes to the matrix have taken place, check
// to see if we're really close to a no-scale matrix. If so, explicitly
// set it to be so. Subsequent code may inspect this matrix to choose