Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1206)

Unified Diff: dm/DMGpuSupport.h

Issue 1845283003: Gamma-correctness pushed into Skia, top-down. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
« no previous file with comments | « dm/DM.cpp ('k') | gm/constcolorprocessor.cpp » ('j') | src/effects/SkImageSource.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698