aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrContext.cpp
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/GrContext.cpp
parent910fff4244cf2a35567adb0caa4f6f7521fc16ff (diff)
Remove sRGB overrides on GrTextureParams. Use GrPaint flags instead.
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r--src/gpu/GrContext.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 04fabaa6b3..51ab64d219 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -367,11 +367,10 @@ bool GrContext::writeSurfacePixels(GrSurface* surface,
if (!drawContext) {
return false;
}
- // SRGBTODO: AllowSRGBInputs? (We could force it on here, so we don't need the
- // per-texture override in config conversion effect?)
GrPaint paint;
paint.addColorFragmentProcessor(fp);
paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
+ paint.setAllowSRGBInputs(true);
SkRect rect = SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height));
drawContext->drawRect(GrNoClip(), paint, matrix, rect, nullptr);
@@ -479,11 +478,10 @@ bool GrContext::readSurfacePixels(GrSurface* src,
GrConfigConversionEffect::kNone_PMConversion, textureMatrix));
}
if (fp) {
- // SRGBTODO: AllowSRGBInputs? (We could force it on here, so we don't need the
- // per-texture override in config conversion effect?)
GrPaint paint;
paint.addColorFragmentProcessor(fp);
paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
+ paint.setAllowSRGBInputs(true);
SkRect rect = SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height));
sk_sp<GrDrawContext> drawContext(
this->drawContext(sk_ref_sp(temp->asRenderTarget())));