Added (color=8888|f16|srgb) option to gpu configurations, along with gpuf16 and gpusrgb predefined configs. Runs the gpu backend in gamma-correct mode (with either FP16 linear or sRGB 8888 frambuffers).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1750383002
Committed: https://skia.googlesource.com/skia/+/a6f58194733c1c50e4fe5f98585e42344f29b6f0
Review URL: https://codereview.chromium.org/1750383002
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 84af854..9d0b545 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -930,11 +930,15 @@
GrContextFactory::GLContextOptions options,
int samples,
bool diText,
+ SkColorType colorType,
+ SkColorProfileType profileType,
bool threaded)
: fContextType(ct)
, fContextOptions(options)
, fSampleCount(samples)
, fUseDIText(diText)
+ , fColorType(colorType)
+ , fProfileType(profileType)
, fThreaded(threaded) {}
void PreAbandonGpuContextErrorHandler(SkError, void*) {}
@@ -959,7 +963,8 @@
GrContextFactory factory(grOptions);
const SkISize size = src.size();
const SkImageInfo info =
- SkImageInfo::Make(size.width(), size.height(), kN32_SkColorType, kPremul_SkAlphaType);
+ SkImageInfo::Make(size.width(), size.height(), fColorType,
+ kPremul_SkAlphaType, fProfileType);
#if SK_SUPPORT_GPU
const int maxDimension = factory.getContextInfo(fContextType, fContextOptions).
fGrContext->caps()->maxTextureSize();