diff options
| author | 2013-03-01 19:42:38 +0000 | |
|---|---|---|
| committer | 2013-03-01 19:42:38 +0000 | |
| commit | 1da8a6a36df0389dd4c213a8f9698874c484c839 (patch) | |
| tree | 617355ae8e988240ff421634b4d50ffee0dff43b /libs/hwui/ProgramCache.cpp | |
| parent | 624de6854f42feb9d2761db857c6f36a47fabb25 (diff) | |
| parent | 096b8d96d539429de5e67b2821ef3f9ee0300842 (diff) | |
Merge "Add shader program selection shortcut" into jb-mr2-dev
Diffstat (limited to 'libs/hwui/ProgramCache.cpp')
| -rw-r--r-- | libs/hwui/ProgramCache.cpp | 6 |
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) { |