Index: src/gpu/effects/GrConfigConversionEffect.cpp |
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp |
index 62ecb451ed3cc67e9e1eaa66526acef6880766d7..f33ad239c518b1de5f98ccec29e02394670a9dd0 100644 |
--- a/src/gpu/effects/GrConfigConversionEffect.cpp |
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp |
@@ -37,7 +37,6 @@ |
builder->fsCodeAppendf("\t%s = %s.bgra;\n", outputColor, outputColor); |
} else { |
const char* swiz = fSwapRedAndBlue ? "bgr" : "rgb"; |
- const char* outputColorH = "outputColorH"; |
switch (fPMConversion) { |
case GrConfigConversionEffect::kMulByAlpha_RoundUp_PMConversion: |
builder->fsCodeAppendf( |
@@ -60,36 +59,6 @@ |
case GrConfigConversionEffect::kDivByAlpha_RoundDown_PMConversion: |
builder->fsCodeAppendf("\t\t%s = %s.a <= 0.0 ? vec4(0,0,0,0) : vec4(floor(%s.%s / %s.a * 255.0) / 255.0, %s.a);\n", |
outputColor, outputColor, outputColor, swiz, outputColor, outputColor); |
- break; |
- case GrConfigConversionEffect::kMulByAlpha_RoundUp_HIGHP_PMConversion: |
- builder->fsCodeAppendf("\thighp vec4 %s;\n", outputColorH); |
- builder->fsCodeAppendf("\t\t%s = %s;\n", outputColorH, outputColor); |
- builder->fsCodeAppendf( |
- "\t\t%s = vec4(ceil(%s.%s * %s.a * 255.0) / 255.0, %s.a);\n", |
- outputColorH, outputColorH, swiz, outputColorH, outputColorH); |
- builder->fsCodeAppendf("\t\t%s = %s;\n", outputColor, outputColorH); |
- break; |
- case GrConfigConversionEffect::kMulByAlpha_RoundDown_HIGHP_PMConversion: |
- builder->fsCodeAppendf("\thighp vec4 %s;\n", outputColorH); |
- builder->fsCodeAppendf("\t\t%s = %s;\n", outputColorH, outputColor); |
- builder->fsCodeAppendf( |
- "\t\t%s = vec4(floor(%s.%s * %s.a * 255.0) / 255.0, %s.a);\n", |
- outputColorH, outputColorH, swiz, outputColorH, outputColorH); |
- builder->fsCodeAppendf("\t\t%s = %s;\n", outputColor, outputColorH); |
- break; |
- case GrConfigConversionEffect::kDivByAlpha_RoundUp_HIGHP_PMConversion: |
- builder->fsCodeAppendf("\thighp vec4 %s;\n", outputColorH); |
- builder->fsCodeAppendf("\t\t%s = %s;\n", outputColorH, outputColor); |
- builder->fsCodeAppendf("\t\t%s = %s.a <= 0.0 ? vec4(0,0,0,0) : vec4(ceil(%s.%s / %s.a * 255.0) / 255.0, %s.a);\n", |
- outputColorH, outputColorH, outputColorH, swiz, outputColorH, outputColorH); |
- builder->fsCodeAppendf("\t\t%s = %s;\n", outputColor, outputColorH); |
- break; |
- case GrConfigConversionEffect::kDivByAlpha_RoundDown_HIGHP_PMConversion: |
- builder->fsCodeAppendf("\thighp vec4 %s;\n", outputColorH); |
- builder->fsCodeAppendf("\t\t%s = %s;\n", outputColorH, outputColor); |
- builder->fsCodeAppendf("\t\t%s = %s.a <= 0.0 ? vec4(0,0,0,0) : vec4(floor(%s.%s / %s.a * 255.0) / 255.0, %s.a);\n", |
- outputColorH, outputColorH, outputColorH, swiz, outputColorH, outputColorH); |
- builder->fsCodeAppendf("\t\t%s = %s;\n", outputColor, outputColorH); |
break; |
default: |
SkFAIL("Unknown conversion op."); |
@@ -215,8 +184,6 @@ |
static const PMConversion kConversionRules[][2] = { |
{kDivByAlpha_RoundDown_PMConversion, kMulByAlpha_RoundUp_PMConversion}, |
{kDivByAlpha_RoundUp_PMConversion, kMulByAlpha_RoundDown_PMConversion}, |
- {kDivByAlpha_RoundDown_HIGHP_PMConversion, kMulByAlpha_RoundUp_HIGHP_PMConversion}, |
- {kDivByAlpha_RoundUp_HIGHP_PMConversion, kMulByAlpha_RoundDown_HIGHP_PMConversion}, |
}; |
GrContext::AutoWideOpenIdentityDraw awoid(context, NULL); |