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

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

Issue 1670063002: extend modecolorfilter to 4f (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove pin for modulate 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
« no previous file with comments | « gm/color4f.cpp ('k') | include/core/SkXfermode.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « gm/color4f.cpp ('k') | include/core/SkXfermode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698