diff options
author | Romain Guy <romainguy@google.com> | 2012-09-14 10:34:46 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-14 10:34:47 -0700 |
commit | 494ac35c27a0960f57b00bf8457f1956ecf149a2 (patch) | |
tree | 070eb3e8d4de89db4f00f2e0d89ba1980175c130 /libs/hwui/ProgramCache.cpp | |
parent | 2dc6af2082b93849b2e5519a8ae7504757286aa9 (diff) | |
parent | 9f44a13a125980fee92cdc76376063129f0eebc9 (diff) |
Merge "Multiply alpha for AA as late as possible" into jb-mr1-dev
Diffstat (limited to 'libs/hwui/ProgramCache.cpp')
-rw-r--r-- | libs/hwui/ProgramCache.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libs/hwui/ProgramCache.cpp b/libs/hwui/ProgramCache.cpp index 0ed8008ca64a..be8f80af55c3 100644 --- a/libs/hwui/ProgramCache.cpp +++ b/libs/hwui/ProgramCache.cpp @@ -671,11 +671,6 @@ String8 ProgramCache::generateFragmentShader(const ProgramDescription& descripti shader.append(gFS_Main_FetchColor); } } - if (description.isAARect) { - shader.append(gFS_Main_AccountForAARect); - } else if (description.isAA) { - shader.append(gFS_Main_AccountForAA); - } if (description.hasGradient) { shader.append(gFS_Main_FetchGradient[gradientIndex(description)]); shader.append(gFS_Main_AddDitherToGradient); @@ -721,6 +716,13 @@ String8 ProgramCache::generateFragmentShader(const ProgramDescription& descripti } // Apply the color op if needed shader.append(gFS_Main_ApplyColorOp[description.colorOp]); + + if (description.isAARect) { + shader.append(gFS_Main_AccountForAARect); + } else if (description.isAA) { + shader.append(gFS_Main_AccountForAA); + } + // Output the fragment if (!blendFramebuffer) { shader.append(gFS_Main_FragColor); |