Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f44a13a authored by Chris Craik's avatar Chris Craik
Browse files

Multiply alpha for AA as late as possible

Should be done after all color computation

Change-Id: Iaadd565f7d2263f111f6841a00e7c341025833d3
parent 4899d6f7
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -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);