summaryrefslogtreecommitdiffstats
path: root/libs/hwui/DisplayListOp.h
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2013-09-20 17:13:18 -0700
committerChris Craik <ccraik@google.com>2013-09-20 17:25:31 -0700
commit996fe656340ede058a6f0e6b18f9ec525ddb4e27 (patch)
tree7efca330f6633eb665b611469f1149dabb1383a5 /libs/hwui/DisplayListOp.h
parent564c45b976b56bc33f18271e1c813a0bd91b2eb4 (diff)
downloadframeworks_base-996fe656340ede058a6f0e6b18f9ec525ddb4e27.zip
frameworks_base-996fe656340ede058a6f0e6b18f9ec525ddb4e27.tar.gz
frameworks_base-996fe656340ede058a6f0e6b18f9ec525ddb4e27.tar.bz2
Correct bitmap merging logic
bug:10863163 This fixes two issues The check for pure translation was incorrect. It was fixed and renamed for clarity. Certain matrix paths weren't setting kTypePositiveScale. For simplicity (and because positive scale is simple to check) removed flag in favor of dynamic checking. Change-Id: Ic5ce235653ef49a68b8b242bd89fc2e95874ecc9
Diffstat (limited to 'libs/hwui/DisplayListOp.h')
-rw-r--r--libs/hwui/DisplayListOp.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h
index b052461..326805a 100644
--- a/libs/hwui/DisplayListOp.h
+++ b/libs/hwui/DisplayListOp.h
@@ -772,7 +772,7 @@ public:
TextureVertex* vertex = &vertices[0];
const bool hasLayer = renderer.hasLayer();
- bool transformed = false;
+ bool pureTranslate = true;
// TODO: manually handle rect clip for bitmaps by adjusting texCoords per op,
// and allowing them to be merged in getBatchId()
@@ -782,7 +782,7 @@ public:
// When we reach multiDraw(), the matrix can be either
// pureTranslate or simple (translate and/or scale).
// If the matrix is not pureTranslate, then we have a scale
- if (state.mMatrix.isPureTranslate()) transformed = true;
+ pureTranslate &= state.mMatrix.isPureTranslate();
Rect texCoords(0, 0, 1, 1);
((DrawBitmapOp*) ops[i].op)->mUvMapper.map(texCoords);
@@ -801,7 +801,7 @@ public:
}
return renderer.drawBitmaps(mBitmap, mEntry, ops.size(), &vertices[0],
- transformed, bounds, mPaint);
+ pureTranslate, bounds, mPaint);
}
virtual void output(int level, uint32_t logFlags) const {