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

Unified Diff: src/codec/SkCodecPriv.h

Issue 2347473007: Revert of Support Float32 output from SkColorSpaceXform (Closed)
Patch Set: 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 | « include/gpu/GrDrawContext.h ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodecPriv.h
diff --git a/src/codec/SkCodecPriv.h b/src/codec/SkCodecPriv.h
index 830f153cbaf4c86380fc7c0e412f219536e452a9..8876b72aa79bda11ca76b94d998ca671dbc4481c 100644
--- a/src/codec/SkCodecPriv.h
+++ b/src/codec/SkCodecPriv.h
@@ -142,20 +142,6 @@
*/
static inline const SkPMColor* get_color_ptr(SkColorTable* colorTable) {
return nullptr != colorTable ? colorTable->readColors() : nullptr;
-}
-
-static inline SkColorSpaceXform::ColorFormat select_xform_format(SkColorType colorType) {
- switch (colorType) {
- case kRGBA_8888_SkColorType:
- return SkColorSpaceXform::kRGBA_8888_ColorFormat;
- case kBGRA_8888_SkColorType:
- return SkColorSpaceXform::kBGRA_8888_ColorFormat;
- case kRGBA_F16_SkColorType:
- return SkColorSpaceXform::kRGBA_F16_ColorFormat;
- default:
- SkASSERT(false);
- return SkColorSpaceXform::kRGBA_8888_ColorFormat;
- }
}
/*
@@ -176,7 +162,7 @@
SkASSERT(colorXform);
uint64_t dstColor;
uint32_t srcColor = colorPtr[fillIndex];
- colorXform->apply(&dstColor, &srcColor, 1, select_xform_format(colorType), alphaType);
+ colorXform->apply(&dstColor, &srcColor, 1, colorType, alphaType);
return dstColor;
}
default:
@@ -357,7 +343,7 @@
return !isLegacy && (needsPremul || isF16 || srcDstNotEqual);
}
-static inline SkAlphaType select_xform_alpha(SkAlphaType dstAlphaType, SkAlphaType srcAlphaType) {
+static inline SkAlphaType select_alpha_xform(SkAlphaType dstAlphaType, SkAlphaType srcAlphaType) {
return (kOpaque_SkAlphaType == srcAlphaType) ? kOpaque_SkAlphaType : dstAlphaType;
}
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698