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

Unified Diff: src/image/SkSurface_Gpu.cpp

Issue 2318663003: Delete SkColorSpace::gammaNamed() from public API (Closed) Base URL: https://skia.googlesource.com/skia.git@delunknownnamed
Patch Set: Rebase Created 4 years, 3 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/core/SkColorSpace_ICC.cpp ('k') | src/image/SkSurface_Raster.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface_Gpu.cpp
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index ebe103ac5a7bd3afcc7ede140bbe15e379ed9249..3007313118c9427fe2acc2c95838a389dea2f3a3 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -136,8 +136,7 @@ void SkSurface_Gpu::onPrepareForExternalIO() {
bool SkSurface_Gpu::Valid(const SkImageInfo& info) {
switch (info.colorType()) {
case kRGBA_F16_SkColorType:
- return info.colorSpace() &&
- SkColorSpace::kLinear_GammaNamed == info.colorSpace()->gammaNamed();
+ return info.colorSpace() && info.colorSpace()->gammaIsLinear();
case kRGBA_8888_SkColorType:
case kBGRA_8888_SkColorType:
return !info.colorSpace() || info.colorSpace()->gammaCloseToSRGB();
@@ -149,7 +148,7 @@ bool SkSurface_Gpu::Valid(const SkImageInfo& info) {
bool SkSurface_Gpu::Valid(GrContext* context, GrPixelConfig config, SkColorSpace* colorSpace) {
switch (config) {
case kRGBA_half_GrPixelConfig:
- return colorSpace && SkColorSpace::kLinear_GammaNamed == colorSpace->gammaNamed();
+ return colorSpace && colorSpace->gammaIsLinear();
case kSRGBA_8888_GrPixelConfig:
case kSBGRA_8888_GrPixelConfig:
return context->caps()->srgbSupport() && colorSpace && colorSpace->gammaCloseToSRGB();
« no previous file with comments | « src/core/SkColorSpace_ICC.cpp ('k') | src/image/SkSurface_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698