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

Unified Diff: dm/DMSrcSink.cpp

Issue 2072813002: Revert of Lots of progress switching to SkColorSpace rather than SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 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') | example/HelloWorld.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 83e93d7c27435402ee9f4cb2e7b22d1ec23f2db3..0490e6f09e76af4991eec21f951086153b1d815b 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -1060,14 +1060,14 @@
int samples,
bool diText,
SkColorType colorType,
- sk_sp<SkColorSpace> colorSpace,
+ SkColorProfileType profileType,
bool threaded)
: fContextType(ct)
, fContextOptions(options)
, fSampleCount(samples)
, fUseDIText(diText)
, fColorType(colorType)
- , fColorSpace(std::move(colorSpace))
+ , fProfileType(profileType)
, fThreaded(threaded) {}
void PreAbandonGpuContextErrorHandler(SkError, void*) {}
@@ -1093,7 +1093,7 @@
const SkISize size = src.size();
const SkImageInfo info =
SkImageInfo::Make(size.width(), size.height(), fColorType,
- kPremul_SkAlphaType, fColorSpace);
+ kPremul_SkAlphaType, fProfileType);
#if SK_SUPPORT_GPU
GrContext* context = factory.getContextInfo(fContextType, fContextOptions).grContext();
const int maxDimension = context->caps()->maxTextureSize();
@@ -1213,9 +1213,9 @@
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
-RasterSink::RasterSink(SkColorType colorType, sk_sp<SkColorSpace> colorSpace)
+RasterSink::RasterSink(SkColorType colorType, SkColorProfileType profileType)
: fColorType(colorType)
- , fColorSpace(std::move(colorSpace)) {}
+ , fProfileType(profileType) {}
Error RasterSink::draw(const Src& src, SkBitmap* dst, SkWStream*, SkString*) const {
const SkISize size = src.size();
@@ -1225,7 +1225,7 @@
SkMallocPixelRef::ZeroedPRFactory factory;
dst->allocPixels(SkImageInfo::Make(size.width(), size.height(),
- fColorType, alphaType, fColorSpace),
+ fColorType, alphaType, fProfileType),
&factory,
nullptr/*colortable*/);
SkCanvas canvas(*dst);
« no previous file with comments | « dm/DMSrcSink.h ('k') | example/HelloWorld.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698