aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-05-24 06:18:48 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-24 06:18:48 -0700
commita167e74b4bb78cfbbec3d8768e5853cd0b9314ab (patch)
tree66e785ca4f6193bcc81f25a16a8b622cd376e31d /src/gpu/gl
parent910fff4244cf2a35567adb0caa4f6f7521fc16ff (diff)
Remove sRGB overrides on GrTextureParams. Use GrPaint flags instead.
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLGpu.cpp6
-rw-r--r--src/gpu/gl/GrGLGpu.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 6b03df3e10..6daf955170 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -3101,7 +3101,7 @@ static void get_tex_param_swizzle(GrPixelConfig config,
}
}
-void GrGLGpu::bindTexture(int unitIdx, const GrTextureParams& params, bool dstConfigAllowsSRGB,
+void GrGLGpu::bindTexture(int unitIdx, const GrTextureParams& params, bool allowSRGBInputs,
GrGLTexture* texture) {
SkASSERT(texture);
@@ -3141,9 +3141,7 @@ void GrGLGpu::bindTexture(int unitIdx, const GrTextureParams& params, bool dstCo
if (this->caps()->srgbSupport()) {
// By default, the decision to allow SRGB decode is based on the destination config.
// A texture can override that by specifying a value in GrTextureParams.
- newTexParams.fSRGBDecode =
- (dstConfigAllowsSRGB || GrTextureParams::kForceAllowSRGB_SRGBMode == params.srgbMode())
- ? GR_GL_DECODE_EXT : GR_GL_SKIP_DECODE_EXT;
+ newTexParams.fSRGBDecode = allowSRGBInputs ? GR_GL_DECODE_EXT : GR_GL_SKIP_DECODE_EXT;
if (setAll || newTexParams.fSRGBDecode != oldTexParams.fSRGBDecode) {
this->setTextureUnit(unitIdx);
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index d6af67947a..0b2198a834 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -57,7 +57,7 @@ public:
void discard(GrRenderTarget*) override;
// Used by GrGLProgram to configure OpenGL state.
- void bindTexture(int unitIdx, const GrTextureParams& params, bool dstConfigAllowsSRGB,
+ void bindTexture(int unitIdx, const GrTextureParams& params, bool allowSRGBInputs,
GrGLTexture* texture);
void bindTexelBuffer(int unitIdx, intptr_t offsetInBytes, GrPixelConfig, GrGLBuffer*);