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

Side by Side Diff: src/core/SkColor.cpp

Issue 1265033002: IWYU: 'core' target, files starting A-C. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase (a file was deleted). Created 5 years, 4 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 | « src/core/SkCanvas.cpp ('k') | src/core/SkColorFilter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1
2 /* 1 /*
3 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9
10 #include "SkColor.h" 8 #include "SkColor.h"
11 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkFixed.h"
12 11
13 SkPMColor SkPreMultiplyARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b) { 12 SkPMColor SkPreMultiplyARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b) {
14 return SkPremultiplyARGBInline(a, r, g, b); 13 return SkPremultiplyARGBInline(a, r, g, b);
15 } 14 }
16 15
17 SkPMColor SkPreMultiplyColor(SkColor c) { 16 SkPMColor SkPreMultiplyColor(SkColor c) {
18 return SkPremultiplyARGBInline(SkColorGetA(c), SkColorGetR(c), 17 return SkPremultiplyARGBInline(SkColorGetA(c), SkColorGetR(c),
19 SkColorGetG(c), SkColorGetB(c)); 18 SkColorGetG(c), SkColorGetB(c));
20 } 19 }
21 20
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 switch (hx >> 16) { 103 switch (hx >> 16) {
105 case 0: r = v; g = t; b = p; break; 104 case 0: r = v; g = t; b = p; break;
106 case 1: r = q; g = v; b = p; break; 105 case 1: r = q; g = v; b = p; break;
107 case 2: r = p; g = v; b = t; break; 106 case 2: r = p; g = v; b = t; break;
108 case 3: r = p; g = q; b = v; break; 107 case 3: r = p; g = q; b = v; break;
109 case 4: r = t; g = p; b = v; break; 108 case 4: r = t; g = p; b = v; break;
110 default: r = v; g = p; b = q; break; 109 default: r = v; g = p; b = q; break;
111 } 110 }
112 return SkColorSetARGB(a, r, g, b); 111 return SkColorSetARGB(a, r, g, b);
113 } 112 }
OLDNEW
« no previous file with comments | « src/core/SkCanvas.cpp ('k') | src/core/SkColorFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698