diff options
author | 2016-12-12 16:14:11 -0800 | |
---|---|---|
committer | 2016-12-13 12:59:12 -0800 | |
commit | 9c97e48fbe389180b4b64845f093c53c92c374f3 (patch) | |
tree | 79622cba9a9867b3cea60f690f50a4eaa3a95cc0 /libs/hwui/Program.h | |
parent | 61341618c5555fc5925879c4a0a797eabf92c3c9 (diff) |
HWUI: set correct sampler for external texture in shaders
Test: hwuimacro hwbitmapcompositeshader
bug:30999911
Change-Id: Ic63f7109a4a7069b62c0b21efae2d4ba7e6d64be
Diffstat (limited to 'libs/hwui/Program.h')
-rw-r--r-- | libs/hwui/Program.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h index 9c4cb098b4c3..e70982f5444a 100644 --- a/libs/hwui/Program.h +++ b/libs/hwui/Program.h @@ -54,6 +54,7 @@ namespace uirenderer { #define PROGRAM_KEY_COLOR_MATRIX 0x20 #define PROGRAM_KEY_COLOR_BLEND 0x40 #define PROGRAM_KEY_BITMAP_NPOT 0x80 +#define PROGRAM_KEY_BITMAP_EXTERNAL 0x100 #define PROGRAM_KEY_SWAP_SRC_DST 0x2000 @@ -133,6 +134,7 @@ struct ProgramDescription { // Shaders bool hasBitmap; + bool isShaderBitmapExternal; bool useShaderBasedWrap; bool hasVertexAlpha; @@ -180,6 +182,7 @@ struct ProgramDescription { modulate = false; hasBitmap = false; + isShaderBitmapExternal = false; useShaderBasedWrap = false; hasGradient = false; @@ -239,6 +242,9 @@ struct ProgramDescription { key |= getEnumForWrap(bitmapWrapS) << PROGRAM_BITMAP_WRAPS_SHIFT; key |= getEnumForWrap(bitmapWrapT) << PROGRAM_BITMAP_WRAPT_SHIFT; } + if (isShaderBitmapExternal) { + key |= PROGRAM_KEY_BITMAP_EXTERNAL; + } } if (hasGradient) key |= PROGRAM_KEY_GRADIENT; key |= programid(gradientType) << PROGRAM_GRADIENT_TYPE_SHIFT; |