Index: dm/DMGpuSupport.h |
diff --git a/dm/DMGpuSupport.h b/dm/DMGpuSupport.h |
index 2352f83ae4c326fef9e0a709898d7c8df22ed1c6..42c5eb30aeb1000532dd6f93eeb1d64c2a502bfc 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); |