diff options
author | 2016-03-10 07:49:08 -0800 | |
---|---|---|
committer | 2016-03-10 07:49:08 -0800 | |
commit | d93c1208520376ec062c8e9b6b7e6d0eac6c6faf (patch) | |
tree | 9ac9c992ebca5ed921e0eb6a2d44e7bcb57f3e02 /dm/DMSrcSink.cpp | |
parent | e6d665e24feabf6c633452885910efd17e5f025e (diff) |
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
Diffstat (limited to 'dm/DMSrcSink.cpp')
-rw-r--r-- | dm/DMSrcSink.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 84af854dea..9d0b545f94 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -930,11 +930,15 @@ GPUSink::GPUSink(GrContextFactory::GLContextType ct, 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 @@ Error GPUSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString* log) co 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(); |