Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Unified Diff: src/gpu/effects/GrConfigConversionEffect.cpp

Issue 377263003: Revert of Make GrGLConfigConversionEffect work for Imagination and some other GPUs. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.h ('k') | src/gpu/gl/GrGLShaderBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.h ('k') | src/gpu/gl/GrGLShaderBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698