| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 * Size of storage must be >= contextSize. | 181 * Size of storage must be >= contextSize. |
| 182 */ | 182 */ |
| 183 Context* createContext(const ContextRec&, void* storage) const; | 183 Context* createContext(const ContextRec&, void* storage) const; |
| 184 | 184 |
| 185 /** | 185 /** |
| 186 * Return the size of a Context returned by createContext. | 186 * Return the size of a Context returned by createContext. |
| 187 * | 187 * |
| 188 * Override this if your subclass overrides createContext, to return the co
rrect size of | 188 * Override this if your subclass overrides createContext, to return the co
rrect size of |
| 189 * your subclass' context. | 189 * your subclass' context. |
| 190 */ | 190 */ |
| 191 virtual size_t contextSize() const; | 191 virtual size_t contextSize(const ContextRec&) const; |
| 192 | 192 |
| 193 /** | 193 /** |
| 194 * Returns true if this shader is just a bitmap, and if not null, returns t
he bitmap, | 194 * Returns true if this shader is just a bitmap, and if not null, returns t
he bitmap, |
| 195 * localMatrix, and tilemodes. If this is not a bitmap, returns false and i
gnores the | 195 * localMatrix, and tilemodes. If this is not a bitmap, returns false and i
gnores the |
| 196 * out-parameters. | 196 * out-parameters. |
| 197 */ | 197 */ |
| 198 bool isABitmap(SkBitmap* outTexture, SkMatrix* outMatrix, TileMode xy[2]) co
nst { | 198 bool isABitmap(SkBitmap* outTexture, SkMatrix* outMatrix, TileMode xy[2]) co
nst { |
| 199 return this->onIsABitmap(outTexture, outMatrix, xy); | 199 return this->onIsABitmap(outTexture, outMatrix, xy); |
| 200 } | 200 } |
| 201 | 201 |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 SkMatrix fLocalMatrix; | 426 SkMatrix fLocalMatrix; |
| 427 | 427 |
| 428 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. | 428 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. |
| 429 friend class SkLocalMatrixShader; | 429 friend class SkLocalMatrixShader; |
| 430 friend class SkBitmapProcShader; // for computeTotalInverse() | 430 friend class SkBitmapProcShader; // for computeTotalInverse() |
| 431 | 431 |
| 432 typedef SkFlattenable INHERITED; | 432 typedef SkFlattenable INHERITED; |
| 433 }; | 433 }; |
| 434 | 434 |
| 435 #endif | 435 #endif |
| OLD | NEW |