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 | |
28 /** \class SkShader | 26 /** \class SkShader |
29 * | 27 * |
30 * Shaders specify the source color(s) for what is being drawn. If a paint | 28 * Shaders specify the source color(s) for what is being drawn. If a paint |
31 * has no shader, then the paint's color is used. If the paint has a | 29 * has no shader, then the paint's color is used. If the paint has a |
32 * shader, then the shader's color(s) are use instead, but they are | 30 * shader, then the shader's color(s) are use instead, but they are |
33 * modulated by the paint's alpha. This makes it easy to create a shader | 31 * modulated by the paint's alpha. This makes it easy to create a shader |
34 * once (e.g. bitmap tiling or gradient) and then change its transparency | 32 * once (e.g. bitmap tiling or gradient) and then change its transparency |
35 * w/o having to modify the original shader... only the paint's alpha needs | 33 * w/o having to modify the original shader... only the paint's alpha needs |
36 * to be modified. | 34 * to be modified. |
37 */ | 35 */ |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 SkMatrix fLocalMatrix; | 455 SkMatrix fLocalMatrix; |
458 | 456 |
459 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. | 457 // So the SkLocalMatrixShader can whack fLocalMatrix in its SkReadBuffer con
structor. |
460 friend class SkLocalMatrixShader; | 458 friend class SkLocalMatrixShader; |
461 friend class SkBitmapProcShader; // for computeTotalInverse() | 459 friend class SkBitmapProcShader; // for computeTotalInverse() |
462 | 460 |
463 typedef SkFlattenable INHERITED; | 461 typedef SkFlattenable INHERITED; |
464 }; | 462 }; |
465 | 463 |
466 #endif | 464 #endif |
OLD | NEW |