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

Unified Diff: tools/skiaserve/Request.cpp

Issue 2188463002: Remove SkSurfaceProps gamma-correctness flag entirely. (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-is-gamma-correct
Patch Set: Created 4 years, 5 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
« no previous file with comments | « tests/SRGBMipMapTest.cpp ('k') | tools/viewer/sk_app/WindowContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/skiaserve/Request.cpp
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp
index f61ed5554a1301678626eda88ea98aac011833be..edc0a6820b40dfe18c0037b267d180b0c07c7933 100644
--- a/tools/skiaserve/Request.cpp
+++ b/tools/skiaserve/Request.cpp
@@ -161,13 +161,12 @@ namespace {
struct ColorAndProfile {
SkColorType fColorType;
bool fSRGB;
- bool fGammaCorrect;
};
ColorAndProfile ColorModes[] = {
- { kN32_SkColorType, false, false },
- { kN32_SkColorType, true, true },
- { kRGBA_F16_SkColorType, true, true },
+ { kN32_SkColorType, false },
+ { kN32_SkColorType, true },
+ { kRGBA_F16_SkColorType, true },
};
}
@@ -178,9 +177,7 @@ SkSurface* Request::createCPUSurface() {
auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
SkImageInfo info = SkImageInfo::Make(bounds.width(), bounds.height(), cap.fColorType,
kPremul_SkAlphaType, cap.fSRGB ? srgbColorSpace : nullptr);
- uint32_t flags = cap.fGammaCorrect ? SkSurfaceProps::kGammaCorrect_Flag : 0;
- SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
- return SkSurface::MakeRaster(info, &props).release();
+ return SkSurface::MakeRaster(info).release();
}
SkSurface* Request::createGPUSurface() {
@@ -190,10 +187,7 @@ SkSurface* Request::createGPUSurface() {
auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
SkImageInfo info = SkImageInfo::Make(bounds.width(), bounds.height(), cap.fColorType,
kPremul_SkAlphaType, cap.fSRGB ? srgbColorSpace : nullptr);
- uint32_t flags = cap.fGammaCorrect ? SkSurfaceProps::kGammaCorrect_Flag : 0;
- SkSurfaceProps props(flags, SkSurfaceProps::kLegacyFontHost_InitType);
- SkSurface* surface = SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info, 0,
- &props).release();
+ SkSurface* surface = SkSurface::MakeRenderTarget(context, SkBudgeted::kNo, info).release();
return surface;
}
« no previous file with comments | « tests/SRGBMipMapTest.cpp ('k') | tools/viewer/sk_app/WindowContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698