OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2007 The Android Open Source Project | 3 * Copyright 2007 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkColorShader_DEFINED | 10 #ifndef SkColorShader_DEFINED |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 typedef SkShader::Context INHERITED; | 49 typedef SkShader::Context INHERITED; |
50 }; | 50 }; |
51 | 51 |
52 // we return false for this, use asAGradient | 52 // we return false for this, use asAGradient |
53 virtual BitmapType asABitmap(SkBitmap* outTexture, | 53 virtual BitmapType asABitmap(SkBitmap* outTexture, |
54 SkMatrix* outMatrix, | 54 SkMatrix* outMatrix, |
55 TileMode xy[2]) const SK_OVERRIDE; | 55 TileMode xy[2]) const SK_OVERRIDE; |
56 | 56 |
57 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; | 57 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; |
58 | 58 |
| 59 virtual bool asNewEffect(GrContext* context, const SkPaint& paint, |
| 60 const SkMatrix* localMatrix, GrColor* grColor, |
| 61 GrEffectRef** grEffect) const SK_OVERRIDE; |
| 62 |
59 SK_TO_STRING_OVERRIDE() | 63 SK_TO_STRING_OVERRIDE() |
60 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader) | 64 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader) |
61 | 65 |
62 protected: | 66 protected: |
63 SkColorShader(SkReadBuffer&); | 67 SkColorShader(SkReadBuffer&); |
64 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 68 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
65 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_
OVERRIDE; | 69 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_
OVERRIDE; |
66 | 70 |
67 private: | 71 private: |
68 SkColor fColor; // ignored if fInheritColor is true | 72 SkColor fColor; // ignored if fInheritColor is true |
69 | 73 |
70 typedef SkShader INHERITED; | 74 typedef SkShader INHERITED; |
71 }; | 75 }; |
72 | 76 |
73 #endif | 77 #endif |
OLD | NEW |