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

Side by Side Diff: include/core/SkColor.h

Issue 1634273002: float components in xfermodes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: disable blitter for official checkin Created 4 years, 10 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 unified diff | Download patch
OLDNEW
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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 */ 165 */
166 struct SkPM4f { 166 struct SkPM4f {
167 enum { 167 enum {
168 A = SK_A32_SHIFT/8, 168 A = SK_A32_SHIFT/8,
169 R = SK_R32_SHIFT/8, 169 R = SK_R32_SHIFT/8,
170 G = SK_G32_SHIFT/8, 170 G = SK_G32_SHIFT/8,
171 B = SK_B32_SHIFT/8, 171 B = SK_B32_SHIFT/8,
172 }; 172 };
173 float fVec[4]; 173 float fVec[4];
174 174
175 float a() const { return fVec[3]; } 175 float a() const { return fVec[A]; }
176 176
177 static SkPM4f FromPMColor(SkPMColor); 177 static SkPM4f FromPMColor(SkPMColor);
178 178
179 bool isUnit() const; 179 #ifdef SK_DEBUG
180 void assertIsUnit() const;
181 #else
182 void assertIsUnit() const {}
183 #endif
180 }; 184 };
181 185
182 /* 186 /*
183 * The float values are 0...1 unpremultiplied 187 * The float values are 0...1 unpremultiplied
184 */ 188 */
185 struct SkColor4f { 189 struct SkColor4f {
186 float fA; 190 float fA;
187 float fR; 191 float fR;
188 float fG; 192 float fG;
189 float fB; 193 float fB;
(...skipping 12 matching lines...) Expand all
202 static SkColor4f FromColor(SkColor); 206 static SkColor4f FromColor(SkColor);
203 207
204 SkColor4f pin() const { 208 SkColor4f pin() const {
205 return Pin(fA, fR, fG, fB); 209 return Pin(fA, fR, fG, fB);
206 } 210 }
207 211
208 SkPM4f premul() const; 212 SkPM4f premul() const;
209 }; 213 };
210 214
211 #endif 215 #endif
OLDNEW
« no previous file with comments | « gyp/core.gypi ('k') | include/core/SkXfermode.h » ('j') | include/core/SkXfermode.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698