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 | 8 |
9 #ifndef SkShader_DEFINED | 9 #ifndef SkShader_DEFINED |
10 #define SkShader_DEFINED | 10 #define SkShader_DEFINED |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 virtual void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count); | 178 virtual void shadeSpanAlpha(int x, int y, uint8_t alpha[], int count); |
179 | 179 |
180 /** | 180 /** |
181 * Helper function that returns true if this shader's shadeSpan16() met
hod | 181 * Helper function that returns true if this shader's shadeSpan16() met
hod |
182 * can be called. | 182 * can be called. |
183 */ | 183 */ |
184 bool canCallShadeSpan16() { | 184 bool canCallShadeSpan16() { |
185 return SkShader::CanCallShadeSpan16(this->getFlags()); | 185 return SkShader::CanCallShadeSpan16(this->getFlags()); |
186 } | 186 } |
187 | 187 |
| 188 // Notification from blitter::blitMask in case we need to see the non-al
pha channels |
| 189 virtual void set3DMask(const SkMask*) {} |
| 190 |
188 protected: | 191 protected: |
189 // Reference to shader, so we don't have to dupe information. | 192 // Reference to shader, so we don't have to dupe information. |
190 const SkShader& fShader; | 193 const SkShader& fShader; |
191 | 194 |
192 enum MatrixClass { | 195 enum MatrixClass { |
193 kLinear_MatrixClass, // no perspective | 196 kLinear_MatrixClass, // no perspective |
194 kFixedStepInX_MatrixClass, // fast perspective, need to call fi
xedStepInX() each | 197 kFixedStepInX_MatrixClass, // fast perspective, need to call fi
xedStepInX() each |
195 // scanline | 198 // scanline |
196 kPerspective_MatrixClass // slow perspective, need to mappoin
ts each pixel | 199 kPerspective_MatrixClass // slow perspective, need to mappoin
ts each pixel |
197 }; | 200 }; |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 // constructors. | 501 // constructors. |
499 SkMatrix fLocalMatrix; | 502 SkMatrix fLocalMatrix; |
500 | 503 |
501 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. | 504 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. |
502 friend class SkLocalMatrixShader; | 505 friend class SkLocalMatrixShader; |
503 | 506 |
504 typedef SkFlattenable INHERITED; | 507 typedef SkFlattenable INHERITED; |
505 }; | 508 }; |
506 | 509 |
507 #endif | 510 #endif |
OLD | NEW |