diff options
author | 2010-08-10 19:21:34 -0700 | |
---|---|---|
committer | 2010-08-10 21:42:40 -0700 | |
commit | 48daa54d31fc59ec969dcff65eb3cbb0ce879a8d (patch) | |
tree | f4ad358f86c6c66b457129ca2aa863be01a47a20 /libs/hwui/ProgramCache.h | |
parent | a674ab74e359ac73b4c4dd6b1a3a771836ac7e40 (diff) |
Add extra blending modes.
This change adds the following blending modes for shaders and color filters:
Add
Multiply
Screen
Overlay
Darken
Lighten
Change-Id: Iff22f5ce6041b43c71b1857d73013f5010ab3413
Diffstat (limited to 'libs/hwui/ProgramCache.h')
-rw-r--r-- | libs/hwui/ProgramCache.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/hwui/ProgramCache.h b/libs/hwui/ProgramCache.h index a1a4a0e1b879..54850ee1d748 100644 --- a/libs/hwui/ProgramCache.h +++ b/libs/hwui/ProgramCache.h @@ -35,7 +35,7 @@ namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// // Debug -#define DEBUG_PROGRAM_CACHE 0 +#define DEBUG_PROGRAM_CACHE 1 // Debug #if DEBUG_PROGRAM_CACHE @@ -57,9 +57,9 @@ namespace uirenderer { #define PROGRAM_KEY_BITMAP_WRAPS_MASK 0x600 #define PROGRAM_KEY_BITMAP_WRAPT_MASK 0x1800 -// Support only the 12 Porter-Duff modes for now -#define PROGRAM_MAX_XFERMODE 0xC -#define PROGRAM_XFERMODE_SHADER_SHIFT 24 +// Encode the xfermodes on 6 bits +#define PROGRAM_MAX_XFERMODE 0x1f +#define PROGRAM_XFERMODE_SHADER_SHIFT 26 #define PROGRAM_XFERMODE_COLOR_OP_SHIFT 20 #define PROGRAM_BITMAP_WRAPS_SHIFT 9 @@ -177,7 +177,7 @@ private: Program* generateProgram(const ProgramDescription& description, programid key); String8 generateVertexShader(const ProgramDescription& description); String8 generateFragmentShader(const ProgramDescription& description); - void generatePorterDuffBlend(String8& shader, const char* name, SkXfermode::Mode mode); + void generateBlend(String8& shader, const char* name, SkXfermode::Mode mode); void generateTextureWrap(String8& shader, GLenum wrapS, GLenum wrapT); void printLongString(const String8& shader) const; |