diff options
| author | 2013-02-25 23:03:54 +0000 | |
|---|---|---|
| committer | 2013-02-25 23:03:54 +0000 | |
| commit | 279e8c64216c1cf8d9f1b53f7d81d863f14e958c (patch) | |
| tree | c12d7da593b40020a6f1083fafeb4a64ef30dde2 /libs/hwui/ProgramCache.cpp | |
| parent | 40bbc3bb9997c6e9ea9aae42edd6bb4430d70978 (diff) | |
| parent | 3ff0bfdd144bba3b023eda8c49b25fb0d0de8653 (diff) | |
Merge "Add new property to debug non-rectangular clip operations" into jb-mr2-dev
Diffstat (limited to 'libs/hwui/ProgramCache.cpp')
| -rw-r--r-- | libs/hwui/ProgramCache.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp index 74d598d5311e..0f014cbfa96a 100644 --- a/libs/hwui/ProgramCache.cpp +++ b/libs/hwui/ProgramCache.cpp @@ -351,6 +351,8 @@ const char* gFS_Main_ApplyColorOp[4] = { // PorterDuff " fragColor = blendColors(colorBlend, fragColor);\n" }; +const char* gFS_Main_DebugHighlight = + " gl_FragColor.rgb = vec3(0.0, gl_FragColor.a, 0.0);\n"; const char* gFS_Footer = "}\n\n"; @@ -604,7 +606,8 @@ String8 ProgramCache::generateFragmentShader(const ProgramDescription& descripti // Optimization for common cases if (!description.isAA && !blendFramebuffer && !description.hasColors && - description.colorOp == ProgramDescription::kColorNone && !description.isPoint) { + description.colorOp == ProgramDescription::kColorNone && + !description.isPoint && !description.hasDebugHighlight) { bool fast = false; const bool noShader = !description.hasGradient && !description.hasBitmap; @@ -752,6 +755,9 @@ String8 ProgramCache::generateFragmentShader(const ProgramDescription& descripti if (description.hasColors) { shader.append(gFS_Main_FragColor_HasColors); } + if (description.hasDebugHighlight) { + shader.append(gFS_Main_DebugHighlight); + } } // End the shader shader.append(gFS_Footer); |