Index: dm/DMGpuSupport.h |
diff --git a/dm/DMGpuSupport.h b/dm/DMGpuSupport.h |
index 490737f41ee283fceaac2d9ff858be13e81d8edd..b98a6d5e0c31d456890e5eb9722416f07a198aae 100644 |
--- a/dm/DMGpuSupport.h |
+++ b/dm/DMGpuSupport.h |
@@ -36,6 +36,9 @@ static inline sk_sp<SkSurface> NewGpuSurface( |
int samples, |
bool useDIText) { |
uint32_t flags = useDIText ? SkSurfaceProps::kUseDeviceIndependentFonts_Flag : 0; |
+ if (SkImageInfoIsGammaCorrect(info)) { |
+ flags |= SkSurfaceProps::kAllowSRGBInputs_Flag; |
+ } |
SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType); |
return SkSurface::MakeRenderTarget(grFactory->get(type, options), SkBudgeted::kNo, |
info, samples, &props); |