aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrConfigConversionEffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/effects/GrConfigConversionEffect.cpp')
-rw-r--r--src/gpu/effects/GrConfigConversionEffect.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/effects/GrConfigConversionEffect.cpp b/src/gpu/effects/GrConfigConversionEffect.cpp
index 2cf7919543..e1ecc7f864 100644
--- a/src/gpu/effects/GrConfigConversionEffect.cpp
+++ b/src/gpu/effects/GrConfigConversionEffect.cpp
@@ -21,16 +21,16 @@ public:
GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
// Use highp throughout the shader to avoid some precision issues on specific GPUs.
- fragBuilder->elevateDefaultPrecision(kHigh_GrSLPrecision);
+ fragBuilder->forceHighPrecision();
if (nullptr == args.fInputColor) {
// could optimize this case, but we aren't for now.
- args.fInputColor = "float4(1)";
+ args.fInputColor = "half4(1)";
}
// Aggressively round to the nearest exact (N / 255) floating point value. This lets us
// find a round-trip preserving pair on some GPUs that do odd byte to float conversion.
- fragBuilder->codeAppendf("float4 color = floor(%s * 255.0 + 0.5) / 255.0;", args.fInputColor);
+ fragBuilder->codeAppendf("half4 color = floor(%s * 255.0 + 0.5) / 255.0;", args.fInputColor);
switch (cce.pmConversion()) {
case GrConfigConversionEffect::kToPremul_PMConversion:
@@ -40,7 +40,7 @@ public:
case GrConfigConversionEffect::kToUnpremul_PMConversion:
fragBuilder->codeAppend(
- "color.rgb = color.a <= 0.0 ? float3(0,0,0) : floor(color.rgb / color.a * 255.0 + 0.5) / 255.0;");
+ "color.rgb = color.a <= 0.0 ? half3(0,0,0) : floor(color.rgb / color.a * 255.0 + 0.5) / 255.0;");
break;
default: