diff options
| -rw-r--r-- | libs/hwui/Program.h | 1 | ||||
| -rw-r--r-- | libs/hwui/ProgramCache.cpp | 6 | ||||
| -rw-r--r-- | libs/hwui/ProgramCache.h | 11 |
3 files changed, 7 insertions, 11 deletions
diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h index 13ee336192d7..e8b6d476b566 100644 --- a/libs/hwui/Program.h +++ b/libs/hwui/Program.h @@ -24,6 +24,7 @@ #include <SkXfermode.h> +#include "Debug.h" #include "Matrix.h" #include "Properties.h" 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) { diff --git a/libs/hwui/ProgramCache.h b/libs/hwui/ProgramCache.h index 6cfe0c7c36b1..1ca148dbfd32 100644 --- a/libs/hwui/ProgramCache.h +++ b/libs/hwui/ProgramCache.h @@ -31,17 +31,6 @@ namespace android { namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// -// Defines -/////////////////////////////////////////////////////////////////////////////// - -// Debug -#if DEBUG_PROGRAMS - #define PROGRAM_LOGD(...) ALOGD(__VA_ARGS__) -#else - #define PROGRAM_LOGD(...) -#endif - -/////////////////////////////////////////////////////////////////////////////// // Cache /////////////////////////////////////////////////////////////////////////////// |