summaryrefslogtreecommitdiff
path: root/libs/hwui/ProgramCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/ProgramCache.cpp')
-rw-r--r--libs/hwui/ProgramCache.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp
index 0f014cbfa96a..f78fb2d65415 100644
--- a/libs/hwui/ProgramCache.cpp
+++ b/libs/hwui/ProgramCache.cpp
@@ -433,6 +433,12 @@ void ProgramCache::clear() {
Program* ProgramCache::get(const ProgramDescription& description) {
programid key = description.key();
+ if (key == (PROGRAM_KEY_TEXTURE | PROGRAM_KEY_A8_TEXTURE)) {
+ // program for A8, unmodulated, texture w/o shader (black text/path textures) is equivalent
+ // to standard texture program (bitmaps, patches). Consider them equivalent.
+ key = PROGRAM_KEY_TEXTURE;
+ }
+
ssize_t index = mCache.indexOfKey(key);
Program* program = NULL;
if (index < 0) {