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

Unified Diff: dm/DMSrcSink.cpp

Issue 1711143002: DM: support --config {f16,srgb} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: stray Created 4 years, 10 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') | no next file » | 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 ea21d7a69593c98df6627ee1360cddfa5669f067..2d2a455e7b7dab047cf7ee93306d664025dc0240 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -1033,7 +1033,9 @@ Error SVGSink::draw(const Src& src, SkBitmap*, SkWStream* dst, SkString*) const
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-RasterSink::RasterSink(SkColorType colorType) : fColorType(colorType) {}
+RasterSink::RasterSink(SkColorType colorType, SkColorProfileType profileType)
+ : fColorType(colorType)
+ , fProfileType(profileType) {}
Error RasterSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString*) const {
const SkISize size = src.size();
@@ -1042,7 +1044,8 @@ Error RasterSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString*) con
(void)SkColorTypeValidateAlphaType(fColorType, alphaType, &alphaType);
SkMallocPixelRef::ZeroedPRFactory factory;
- dst->allocPixels(SkImageInfo::Make(size.width(), size.height(), fColorType, alphaType),
+ dst->allocPixels(SkImageInfo::Make(size.width(), size.height(),
+ fColorType, alphaType, fProfileType),
&factory,
nullptr/*colortable*/);
SkCanvas canvas(*dst);
« no previous file with comments | « dm/DMSrcSink.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698