diff options
| author | 2013-02-13 18:39:43 -0800 | |
|---|---|---|
| committer | 2013-02-13 18:39:43 -0800 | |
| commit | ff316ec7a76e52572a2e89b691e6b3bba0cafba3 (patch) | |
| tree | 8418a45b809c9382a0fc3d9d9bb6db6a537dd4cc /libs/hwui/Program.h | |
| parent | 2b44eb75c42e4caa94f0b002f0ea9e134fe7b543 (diff) | |
Implement support for drawBitmapMesh's colors array
Change-Id: I3d901f6267c2918771ac30ff55c8d80c3ab5b725
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; } |