| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 | 327 |
| 328 ////////////////////////////////////////////////////////////////////////// | 328 ////////////////////////////////////////////////////////////////////////// |
| 329 // Factory methods for stock shaders | 329 // Factory methods for stock shaders |
| 330 | 330 |
| 331 /** Call this to create a new shader that will draw with the specified bitma
p. | 331 /** Call this to create a new shader that will draw with the specified bitma
p. |
| 332 * | 332 * |
| 333 * If the bitmap cannot be used (e.g. has no pixels, or its dimensions | 333 * If the bitmap cannot be used (e.g. has no pixels, or its dimensions |
| 334 * exceed implementation limits (currently at 64K - 1)) then SkEmptyShader | 334 * exceed implementation limits (currently at 64K - 1)) then SkEmptyShader |
| 335 * may be returned. | 335 * may be returned. |
| 336 * | 336 * |
| 337 * If the src is kA8_Config then that mask will be colorized using the colo
r on |
| 338 * the paint. |
| 339 * |
| 337 * @param src The bitmap to use inside the shader | 340 * @param src The bitmap to use inside the shader |
| 338 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir
ection. | 341 * @param tmx The tiling mode to use when sampling the bitmap in the x-dir
ection. |
| 339 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir
ection. | 342 * @param tmy The tiling mode to use when sampling the bitmap in the y-dir
ection. |
| 340 * @return Returns a new shader object. Note: this function never retur
ns null. | 343 * @return Returns a new shader object. Note: this function never retur
ns null. |
| 341 */ | 344 */ |
| 342 static SkShader* CreateBitmapShader(const SkBitmap& src, | 345 static SkShader* CreateBitmapShader(const SkBitmap& src, |
| 343 TileMode tmx, TileMode tmy); | 346 TileMode tmx, TileMode tmy); |
| 344 | 347 |
| 345 SkDEVCODE(virtual void toString(SkString* str) const;) | 348 SkDEVCODE(virtual void toString(SkString* str) const;) |
| 346 | 349 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 371 SkDEBUGCODE(SkBool8 fInSetContext;) | 374 SkDEBUGCODE(SkBool8 fInSetContext;) |
| 372 | 375 |
| 373 static SkShader* CreateBitmapShader(const SkBitmap& src, | 376 static SkShader* CreateBitmapShader(const SkBitmap& src, |
| 374 TileMode, TileMode, | 377 TileMode, TileMode, |
| 375 void* storage, size_t storageSize); | 378 void* storage, size_t storageSize); |
| 376 friend class SkAutoBitmapShaderInstall; | 379 friend class SkAutoBitmapShaderInstall; |
| 377 typedef SkFlattenable INHERITED; | 380 typedef SkFlattenable INHERITED; |
| 378 }; | 381 }; |
| 379 | 382 |
| 380 #endif | 383 #endif |
| OLD | NEW |