| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 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 SkColor_DEFINED | 8 #ifndef SkColor_DEFINED |
| 9 #define SkColor_DEFINED | 9 #define SkColor_DEFINED |
| 10 | 10 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 uint64_t toF16() const; // 4 float16 values packed into uint64_t | 185 uint64_t toF16() const; // 4 float16 values packed into uint64_t |
| 186 static SkPM4f FromF16(const uint16_t[4]); | 186 static SkPM4f FromF16(const uint16_t[4]); |
| 187 | 187 |
| 188 #ifdef SK_DEBUG | 188 #ifdef SK_DEBUG |
| 189 void assertIsUnit() const; | 189 void assertIsUnit() const; |
| 190 #else | 190 #else |
| 191 void assertIsUnit() const {} | 191 void assertIsUnit() const {} |
| 192 #endif | 192 #endif |
| 193 }; | 193 }; |
| 194 | 194 |
| 195 typedef SkPM4f (*SkXfermodeProc4f)(const SkPM4f& src, const SkPM4f& dst); |
| 196 |
| 195 /* | 197 /* |
| 196 * The float values are 0...1 unpremultiplied | 198 * The float values are 0...1 unpremultiplied |
| 197 */ | 199 */ |
| 198 struct SkColor4f { | 200 struct SkColor4f { |
| 199 float fA; | 201 float fA; |
| 200 float fR; | 202 float fR; |
| 201 float fG; | 203 float fG; |
| 202 float fB; | 204 float fB; |
| 203 | 205 |
| 204 bool operator==(const SkColor4f& other) const { | 206 bool operator==(const SkColor4f& other) const { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 215 static SkColor4f FromColor(SkColor); | 217 static SkColor4f FromColor(SkColor); |
| 216 | 218 |
| 217 SkColor4f pin() const { | 219 SkColor4f pin() const { |
| 218 return Pin(fA, fR, fG, fB); | 220 return Pin(fA, fR, fG, fB); |
| 219 } | 221 } |
| 220 | 222 |
| 221 SkPM4f premul() const; | 223 SkPM4f premul() const; |
| 222 }; | 224 }; |
| 223 | 225 |
| 224 #endif | 226 #endif |
| OLD | NEW |