Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2015 The Android Open Source Project | 2 * Copyright 2015 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkCodecPriv_DEFINED | 8 #ifndef SkCodecPriv_DEFINED |
| 9 #define SkCodecPriv_DEFINED | 9 #define SkCodecPriv_DEFINED |
| 10 | 10 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 324 | 324 |
| 325 // Need a color xform when dst space does not match the src. | 325 // Need a color xform when dst space does not match the src. |
| 326 bool srcDstNotEqual = !SkColorSpace::Equals(srcInfo.colorSpace(), dstInfo.co lorSpace()); | 326 bool srcDstNotEqual = !SkColorSpace::Equals(srcInfo.colorSpace(), dstInfo.co lorSpace()); |
| 327 | 327 |
| 328 // We never perform a color xform in legacy mode. | 328 // We never perform a color xform in legacy mode. |
| 329 bool isLegacy = nullptr == dstInfo.colorSpace(); | 329 bool isLegacy = nullptr == dstInfo.colorSpace(); |
| 330 | 330 |
| 331 return !isLegacy && (needsPremul || isF16 || srcDstNotEqual); | 331 return !isLegacy && (needsPremul || isF16 || srcDstNotEqual); |
| 332 } | 332 } |
| 333 | 333 |
| 334 static inline SkAlphaType color_xform_alpha_type(SkAlphaType dstAlphaType, SkAlp haType srcAlphaType) | |
|
scroggo
2016/09/07 20:32:58
This name seems extra specific, and yet it doesn't
msarett
2016/09/07 22:27:41
Going with "select_alpha_xform".
| |
| 335 { | |
| 336 return (kOpaque_SkAlphaType == srcAlphaType) ? kOpaque_SkAlphaType : dstAlph aType; | |
| 337 } | |
| 338 | |
| 334 #endif // SkCodecPriv_DEFINED | 339 #endif // SkCodecPriv_DEFINED |
| OLD | NEW |