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

Unified Diff: dm/DMSrcSink.cpp

Issue 1750383002: Progress on gamma-correctness in the GPU backend. Fixed conversion of color and profile type to pix… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove ANGLE sRGB, which isn't going to be supported in the near term. Created 4 years, 9 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 | « dm/DMSrcSink.h ('k') | tests/TestConfigParsing.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 9e45ce9b692ca25726d791e497567fe77dad41b9..f142fddb9ae3f8280f949f8db1e237daf476a556 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -855,11 +855,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*) {}
@@ -884,7 +888,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();
« no previous file with comments | « dm/DMSrcSink.h ('k') | tests/TestConfigParsing.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698