diff options
| author | 2015-08-18 23:51:11 +0000 | |
|---|---|---|
| committer | 2015-08-18 23:51:11 +0000 | |
| commit | 0b8045425ff58f992046ff2be35bc91001dabf7b (patch) | |
| tree | d1289bfa5ec564d7db654baf2ba4c74857a135ae /libs | |
| parent | c9ecc985947462e3032fdd3b1c6abc0d5b5b1084 (diff) | |
| parent | e688bf720334f58e0003b4c75b53cc7618adf43f (diff) | |
Merge "Constrain drawBitmap matrix-to-rect optimization" into mnc-dev
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/hwui/DisplayListCanvas.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/hwui/DisplayListCanvas.cpp b/libs/hwui/DisplayListCanvas.cpp index aeb1a3d0ae68..2dd52788074d 100644 --- a/libs/hwui/DisplayListCanvas.cpp +++ b/libs/hwui/DisplayListCanvas.cpp @@ -255,7 +255,9 @@ void DisplayListCanvas::drawBitmap(const SkBitmap& bitmap, const SkMatrix& matri const SkPaint* paint) { if (matrix.isIdentity()) { drawBitmap(&bitmap, paint); - } else if (!(matrix.getType() & ~(SkMatrix::kScale_Mask | SkMatrix::kTranslate_Mask))) { + } else if (!(matrix.getType() & ~(SkMatrix::kScale_Mask | SkMatrix::kTranslate_Mask)) + && MathUtils::isPositive(matrix.getScaleX()) + && MathUtils::isPositive(matrix.getScaleY())) { // SkMatrix::isScaleTranslate() not available in L SkRect src; SkRect dst; |