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 SkShader_DEFINED | 8 #ifndef SkShader_DEFINED |
9 #define SkShader_DEFINED | 9 #define SkShader_DEFINED |
10 | 10 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
142 */ | 142 */ |
143 virtual uint8_t getSpan16Alpha() const { return fPaintAlpha; } | 143 virtual uint8_t getSpan16Alpha() const { return fPaintAlpha; } |
144 | 144 |
145 /** | 145 /** |
146 * Called for each span of the object being drawn. Your subclass should | 146 * Called for each span of the object being drawn. Your subclass should |
147 * set the appropriate colors (with premultiplied alpha) that correspon d | 147 * set the appropriate colors (with premultiplied alpha) that correspon d |
148 * to the specified device coordinates. | 148 * to the specified device coordinates. |
149 */ | 149 */ |
150 virtual void shadeSpan(int x, int y, SkPMColor[], int count) = 0; | 150 virtual void shadeSpan(int x, int y, SkPMColor[], int count) = 0; |
151 | 151 |
152 typedef void (*ShadeProc)(void* ctx, int x, int y, SkPMColor[], int coun t); | 152 typedef void (*ShadeProc)(const void* ctx, int x, int y, SkPMColor[], in t count); |
reed1
2015/12/17 18:12:14
Its seems odd to me that this is declared const, s
herb_g
2015/12/17 19:59:22
Added comment as per our discussion.
| |
153 virtual ShadeProc asAShadeProc(void** ctx); | 153 virtual ShadeProc asAShadeProc(void** ctx); |
154 | 154 |
155 /** | 155 /** |
156 * Called only for 16bit devices when getFlags() returns | 156 * Called only for 16bit devices when getFlags() returns |
157 * kOpaqueAlphaFlag | kHasSpan16_Flag | 157 * kOpaqueAlphaFlag | kHasSpan16_Flag |
158 */ | 158 */ |
159 virtual void shadeSpan16(int x, int y, uint16_t[], int count); | 159 virtual void shadeSpan16(int x, int y, uint16_t[], int count); |
160 | 160 |
161 /** | 161 /** |
162 * Similar to shadeSpan, but only returns the alpha-channel for a span. | 162 * Similar to shadeSpan, but only returns the alpha-channel for a span. |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
439 SkMatrix fLocalMatrix; | 439 SkMatrix fLocalMatrix; |
440 | 440 |
441 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. | 441 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con structor. |
442 friend class SkLocalMatrixShader; | 442 friend class SkLocalMatrixShader; |
443 friend class SkBitmapProcShader; // for computeTotalInverse() | 443 friend class SkBitmapProcShader; // for computeTotalInverse() |
444 | 444 |
445 typedef SkFlattenable INHERITED; | 445 typedef SkFlattenable INHERITED; |
446 }; | 446 }; |
447 | 447 |
448 #endif | 448 #endif |
OLD | NEW |