diff options
author | Chris Craik <ccraik@google.com> | 2015-08-19 00:54:00 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-19 00:54:00 +0000 |
commit | 892768fb3efa6bde3f24ffa09a013fa76cab855e (patch) | |
tree | 9b2ad60da260d1235386a4ae6fc47407a3c33250 /libs/hwui | |
parent | df23f37105747918921099e7618b4071358fac92 (diff) | |
parent | 0b8045425ff58f992046ff2be35bc91001dabf7b (diff) | |
download | frameworks_base-892768fb3efa6bde3f24ffa09a013fa76cab855e.zip frameworks_base-892768fb3efa6bde3f24ffa09a013fa76cab855e.tar.gz frameworks_base-892768fb3efa6bde3f24ffa09a013fa76cab855e.tar.bz2 |
am 0b804542: Merge "Constrain drawBitmap matrix-to-rect optimization" into mnc-dev
* commit '0b8045425ff58f992046ff2be35bc91001dabf7b':
Constrain drawBitmap matrix-to-rect optimization
Diffstat (limited to 'libs/hwui')
-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 aeb1a3d..2dd5278 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; |