Remove sRGB overrides on GrTextureParams. Use GrPaint flags instead.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2002253002
Review-Url: https://codereview.chromium.org/2002253002
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 04fabaa..51ab64d 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -367,11 +367,10 @@
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 @@
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())));