diff options
Diffstat (limited to 'dm/DMGpuSupport.h')
-rw-r--r-- | dm/DMGpuSupport.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dm/DMGpuSupport.h b/dm/DMGpuSupport.h index 2352f83ae4..42c5eb30ae 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); |