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

Unified Diff: src/core/SkColorSpaceXform.cpp

Issue 2326603002: Assert that F16 is always treated as linear in 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkColorSpaceXform.cpp
diff --git a/src/core/SkColorSpaceXform.cpp b/src/core/SkColorSpaceXform.cpp
index f20886af7b11bd80e29e986b2df521ac41463f8e..2c5df2c5e287b1d5c84075c02a7da8edac7ea727 100644
--- a/src/core/SkColorSpaceXform.cpp
+++ b/src/core/SkColorSpaceXform.cpp
@@ -1115,6 +1115,9 @@ void SkColorSpaceXform_Base<kDst, kCSM>
::apply(void* dst, const uint32_t* src, int len, SkColorType dstColorType, SkAlphaType dstAlphaType)
const
{
+ // F16 is always treated as linear.
+ SkASSERT(kRGBA_F16_SkColorType != dstColorType || kLinear_SkGammaNamed == kDst);
+
if (kFull_ColorSpaceMatch == kCSM) {
switch (dstAlphaType) {
case kPremul_SkAlphaType:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698