summaryrefslogtreecommitdiffstats
path: root/skia/sgl/SkBitmapProcState.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'skia/sgl/SkBitmapProcState.cpp')
-rw-r--r--skia/sgl/SkBitmapProcState.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/skia/sgl/SkBitmapProcState.cpp b/skia/sgl/SkBitmapProcState.cpp
index aff7e9d..428921d 100644
--- a/skia/sgl/SkBitmapProcState.cpp
+++ b/skia/sgl/SkBitmapProcState.cpp
@@ -296,9 +296,8 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
}
const SkMatrix* m;
- if (inv.getType() <= SkMatrix::kTranslate_Mask ||
- (SkShader::kClamp_TileMode == fTileModeX &&
- SkShader::kClamp_TileMode == fTileModeY)) {
+ if (SkShader::kClamp_TileMode == fTileModeX &&
+ SkShader::kClamp_TileMode == fTileModeY) {
m = &inv;
} else {
fUnitInvMatrix = inv;
@@ -331,16 +330,6 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
fInvMatrix = m;
fInvProc = m->getMapXYProc();
fInvType = m->getType();
- if (fInvType <= SkMatrix::kTranslate_Mask &&
- inv.getType() > SkMatrix::kTranslate_Mask) {
- SkASSERT(inv.getType() <=
- (SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask));
- // It is possible that by the calculation of fUnitInvMatrix, we have
- // eliminated the scale transformation of the matrix (e.g., if inv^(-1)
- // scales fOrigBitmap into an 1X1 rect). We add the scale flag back so
- // that we don't make wrong choice in chooseMatrixProc().
- fInvType |= SkMatrix::kScale_Mask;
- }
fInvSx = SkScalarToFixed(m->getScaleX());
fInvSy = SkScalarToFixed(m->getScaleY());
fInvKy = SkScalarToFixed(m->getSkewY());