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 |
11 #include "SkBitmap.h" | 11 #include "SkBitmap.h" |
12 #include "SkFlattenable.h" | 12 #include "SkFlattenable.h" |
13 #include "SkImageInfo.h" | 13 #include "SkImageInfo.h" |
14 #include "SkMask.h" | 14 #include "SkMask.h" |
15 #include "SkMatrix.h" | 15 #include "SkMatrix.h" |
16 #include "SkPaint.h" | 16 #include "SkPaint.h" |
17 #include "../gpu/GrColor.h" | 17 #include "../gpu/GrColor.h" |
18 | 18 |
19 class SkColorFilter; | 19 class SkColorFilter; |
20 class SkPath; | 20 class SkPath; |
21 class SkPicture; | 21 class SkPicture; |
22 class SkXfermode; | 22 class SkXfermode; |
23 class GrContext; | 23 class GrContext; |
24 class GrFragmentProcessor; | 24 class GrFragmentProcessor; |
25 | 25 |
| 26 #define SK_SUPPORT_LEGACY_CREATESHADER_PTR |
| 27 |
26 /** \class SkShader | 28 /** \class SkShader |
27 * | 29 * |
28 * Shaders specify the source color(s) for what is being drawn. If a paint | 30 * Shaders specify the source color(s) for what is being drawn. If a paint |
29 * has no shader, then the paint's color is used. If the paint has a | 31 * has no shader, then the paint's color is used. If the paint has a |
30 * shader, then the shader's color(s) are use instead, but they are | 32 * shader, then the shader's color(s) are use instead, but they are |
31 * modulated by the paint's alpha. This makes it easy to create a shader | 33 * modulated by the paint's alpha. This makes it easy to create a shader |
32 * once (e.g. bitmap tiling or gradient) and then change its transparency | 34 * once (e.g. bitmap tiling or gradient) and then change its transparency |
33 * w/o having to modify the original shader... only the paint's alpha needs | 35 * w/o having to modify the original shader... only the paint's alpha needs |
34 * to be modified. | 36 * to be modified. |
35 */ | 37 */ |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 SkMatrix fLocalMatrix; | 457 SkMatrix fLocalMatrix; |
456 | 458 |
457 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. | 459 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. |
458 friend class SkLocalMatrixShader; | 460 friend class SkLocalMatrixShader; |
459 friend class SkBitmapProcShader; // for computeTotalInverse() | 461 friend class SkBitmapProcShader; // for computeTotalInverse() |
460 | 462 |
461 typedef SkFlattenable INHERITED; | 463 typedef SkFlattenable INHERITED; |
462 }; | 464 }; |
463 | 465 |
464 #endif | 466 #endif |
OLD | NEW |