diff options
Diffstat (limited to 'libs/hwui/Program.h')
| -rw-r--r-- | libs/hwui/Program.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/Program.h b/libs/hwui/Program.h index b1df98057b38..7b67b3c3ffc3 100644 --- a/libs/hwui/Program.h +++ b/libs/hwui/Program.h @@ -81,6 +81,8 @@ namespace uirenderer { #define PROGRAM_IS_SIMPLE_GRADIENT 41 +#define PROGRAM_HAS_COLORS 42 + /////////////////////////////////////////////////////////////////////////////// // Types /////////////////////////////////////////////////////////////////////////////// @@ -120,6 +122,9 @@ struct ProgramDescription { bool hasExternalTexture; bool hasTextureTransform; + // Color attribute + bool hasColors; + // Modulate, this should only be set when setColor() return true bool modulate; @@ -164,6 +169,8 @@ struct ProgramDescription { hasExternalTexture = false; hasTextureTransform = false; + hasColors = false; + isAA = false; modulate = false; @@ -259,6 +266,7 @@ struct ProgramDescription { if (hasTextureTransform) key |= programid(0x1) << PROGRAM_HAS_TEXTURE_TRANSFORM_SHIFT; if (hasGammaCorrection) key |= programid(0x1) << PROGRAM_HAS_GAMMA_CORRECTION; if (isSimpleGradient) key |= programid(0x1) << PROGRAM_IS_SIMPLE_GRADIENT; + if (hasColors) key |= programid(0x1) << PROGRAM_HAS_COLORS; return key; } |