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

Unified Diff: src/gpu/SkGr.cpp

Issue 2074103004: Revert of More removal of 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 | « src/gpu/GrSurface.cpp ('k') | src/gpu/SkGrPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGr.cpp
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index f937b16d55e166f0d1481186752e4507a2ed4816..60fcdd513965a3a678b509036f0f1ea916af4de8 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -453,10 +453,10 @@
return kUnknown_GrPixelConfig;
}
-bool GrPixelConfigToColorAndColorSpace(GrPixelConfig config, SkColorType* ctOut,
- sk_sp<SkColorSpace>* csOut) {
+bool GrPixelConfig2ColorAndProfileType(GrPixelConfig config, SkColorType* ctOut,
+ SkColorProfileType* ptOut) {
SkColorType ct;
- sk_sp<SkColorSpace> cs = nullptr;
+ SkColorProfileType pt = kLinear_SkColorProfileType;
switch (config) {
case kAlpha_8_GrPixelConfig:
ct = kAlpha_8_SkColorType;
@@ -478,11 +478,11 @@
break;
case kSRGBA_8888_GrPixelConfig:
ct = kRGBA_8888_SkColorType;
- cs = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
+ pt = kSRGB_SkColorProfileType;
break;
case kSBGRA_8888_GrPixelConfig:
ct = kBGRA_8888_SkColorType;
- cs = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
+ pt = kSRGB_SkColorProfileType;
break;
case kRGBA_half_GrPixelConfig:
ct = kRGBA_F16_SkColorType;
@@ -493,8 +493,8 @@
if (ctOut) {
*ctOut = ct;
}
- if (csOut) {
- *csOut = cs;
+ if (ptOut) {
+ *ptOut = pt;
}
return true;
}
@@ -724,9 +724,9 @@
SkASSERT(h <= desc.fHeight);
#endif
const GrPixelConfig config = tex->config();
- SkColorType ct = kUnknown_SkColorType;
+ SkColorType ct;
SkAlphaType at = isOpaque ? kOpaque_SkAlphaType : kPremul_SkAlphaType;
- if (!GrPixelConfigToColorAndColorSpace(config, &ct, nullptr)) {
+ if (!GrPixelConfig2ColorAndProfileType(config, &ct, nullptr)) {
ct = kUnknown_SkColorType;
}
return SkImageInfo::Make(w, h, ct, at);
« no previous file with comments | « src/gpu/GrSurface.cpp ('k') | src/gpu/SkGrPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698