| 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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 162 |
| 163 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 163 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 164 | 164 |
| 165 /* | 165 /* |
| 166 * The float values are 0...1 premultiplied | 166 * The float values are 0...1 premultiplied |
| 167 */ | 167 */ |
| 168 struct SkPM4f { | 168 struct SkPM4f { |
| 169 float fVec[4]; | 169 float fVec[4]; |
| 170 | 170 |
| 171 float a() const { return fVec[SK_A32_SHIFT/8]; } | 171 float a() const { return fVec[SK_A32_SHIFT/8]; } |
| 172 | |
| 173 static SkPM4f FromPMColor(SkPMColor); | |
| 174 }; | 172 }; |
| 175 | 173 |
| 176 /* | 174 /* |
| 177 * The float values are 0...1 unpremultiplied | 175 * The float values are 0...1 unpremultiplied |
| 178 */ | 176 */ |
| 179 struct SkColor4f { | 177 struct SkColor4f { |
| 180 float fA; | 178 float fA; |
| 181 float fR; | 179 float fR; |
| 182 float fG; | 180 float fG; |
| 183 float fB; | 181 float fB; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 196 static SkColor4f FromColor(SkColor); | 194 static SkColor4f FromColor(SkColor); |
| 197 | 195 |
| 198 SkColor4f pin() const { | 196 SkColor4f pin() const { |
| 199 return Pin(fA, fR, fG, fB); | 197 return Pin(fA, fR, fG, fB); |
| 200 } | 198 } |
| 201 | 199 |
| 202 SkPM4f premul() const; | 200 SkPM4f premul() const; |
| 203 }; | 201 }; |
| 204 | 202 |
| 205 #endif | 203 #endif |
| OLD | NEW |