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

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

Issue 1104183004: De-proc Color32 (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: duh Created 5 years, 8 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 | « no previous file | include/core/SkTypes.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 2011 Google Inc. 2 * Copyright 2011 Google Inc.
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 SkBlitRow_DEFINED 8 #ifndef SkBlitRow_DEFINED
9 #define SkBlitRow_DEFINED 9 #define SkBlitRow_DEFINED
10 10
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 /** Function pointer that blends 32bit colors onto a 32bit destination. 57 /** Function pointer that blends 32bit colors onto a 32bit destination.
58 @param dst array of dst 32bit colors 58 @param dst array of dst 32bit colors
59 @param src array of src 32bit colors (w/ or w/o alpha) 59 @param src array of src 32bit colors (w/ or w/o alpha)
60 @param count number of colors to blend 60 @param count number of colors to blend
61 @param alpha global alpha to be applied to all src colors 61 @param alpha global alpha to be applied to all src colors
62 */ 62 */
63 typedef void (*Proc32)(uint32_t dst[], const SkPMColor src[], int count, U8C PU alpha); 63 typedef void (*Proc32)(uint32_t dst[], const SkPMColor src[], int count, U8C PU alpha);
64 64
65 static Proc32 Factory32(unsigned flags32); 65 static Proc32 Factory32(unsigned flags32);
66 66
67 /** Function pointer that blends a single color with a row of 32-bit colors
68 onto a 32-bit destination
69 */
70 typedef void (*ColorProc)(SkPMColor dst[], const SkPMColor src[], int count, SkPMColor color);
71
72 /** Blend a single color onto a row of S32 pixels, writing the result 67 /** Blend a single color onto a row of S32 pixels, writing the result
73 into a row of D32 pixels. src and dst may be the same memory, but 68 into a row of D32 pixels. src and dst may be the same memory, but
74 if they are not, they may not overlap. 69 if they are not, they may not overlap.
75 */ 70 */
76 static void Color32(SkPMColor dst[], const SkPMColor src[], int count, SkPMC olor color); 71 static void Color32(SkPMColor dst[], const SkPMColor src[], int count, SkPMC olor color);
77 72
78 //! Public entry-point to return a blit function ptr
79 static ColorProc ColorProcFactory();
80
81 /** These static functions are called by the Factory and Factory32 73 /** These static functions are called by the Factory and Factory32
82 functions, and should return either NULL, or a 74 functions, and should return either NULL, or a
83 platform-specific function-ptr to be used in place of the 75 platform-specific function-ptr to be used in place of the
84 system default. 76 system default.
85 */ 77 */
86 78
87 static Proc32 PlatformProcs32(unsigned flags); 79 static Proc32 PlatformProcs32(unsigned flags);
88 static ColorProc PlatformColorProc();
89 80
90 static Proc16 PlatformFactory565(unsigned flags); 81 static Proc16 PlatformFactory565(unsigned flags);
91 static ColorProc16 PlatformColorFactory565(unsigned flags); 82 static ColorProc16 PlatformColorFactory565(unsigned flags);
92 83
93 private: 84 private:
94 enum { 85 enum {
95 kFlags16_Mask = 7, 86 kFlags16_Mask = 7,
96 kFlags32_Mask = 3 87 kFlags32_Mask = 3
97 }; 88 };
98 }; 89 };
99 90
100 #endif 91 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698