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

Unified Diff: src/core/SkMipMap.cpp

Issue 2086583002: update callers to not use SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rm flag instead of commenting it out 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/core/SkLinearBitmapPipeline_sample.h ('k') | src/core/SkSpanProcs.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkMipMap.cpp
diff --git a/src/core/SkMipMap.cpp b/src/core/SkMipMap.cpp
index b9302cdb6841bab2fcf3de8b646311dd0f87632f..f469762ebac872f988ecf55aac5a0f53cbd30576 100644
--- a/src/core/SkMipMap.cpp
+++ b/src/core/SkMipMap.cpp
@@ -304,14 +304,6 @@ size_t SkMipMap::AllocLevelsSize(int levelCount, size_t pixelSize) {
return sk_64_asS32(size);
}
-static bool treat_like_srgb(const SkImageInfo& info) {
- if (info.colorSpace()) {
- return info.colorSpace()->gammaCloseToSRGB();
- } else {
- return kSRGB_SkColorProfileType == info.profileType();
- }
-}
-
SkMipMap* SkMipMap::Build(const SkPixmap& src, SkSourceGammaTreatment treatment,
SkDiscardableFactoryProc fact) {
typedef void FilterProc(void*, const void* srcPtr, size_t srcRB, int count);
@@ -328,7 +320,7 @@ SkMipMap* SkMipMap::Build(const SkPixmap& src, SkSourceGammaTreatment treatment,
const SkColorType ct = src.colorType();
const SkAlphaType at = src.alphaType();
const bool srgbGamma = (SkSourceGammaTreatment::kRespect == treatment)
- && treat_like_srgb(src.info());
+ && src.info().gammaCloseToSRGB();
switch (ct) {
case kRGBA_8888_SkColorType:
« no previous file with comments | « src/core/SkLinearBitmapPipeline_sample.h ('k') | src/core/SkSpanProcs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698