OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 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 SkColorShader_DEFINED | 8 #ifndef SkColorShader_DEFINED |
9 #define SkColorShader_DEFINED | 9 #define SkColorShader_DEFINED |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 typedef SkShader::Context INHERITED; | 47 typedef SkShader::Context INHERITED; |
48 }; | 48 }; |
49 | 49 |
50 // we return false for this, use asAGradient | 50 // we return false for this, use asAGradient |
51 virtual BitmapType asABitmap(SkBitmap* outTexture, | 51 virtual BitmapType asABitmap(SkBitmap* outTexture, |
52 SkMatrix* outMatrix, | 52 SkMatrix* outMatrix, |
53 TileMode xy[2]) const SK_OVERRIDE; | 53 TileMode xy[2]) const SK_OVERRIDE; |
54 | 54 |
55 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; | 55 virtual GradientType asAGradient(GradientInfo* info) const SK_OVERRIDE; |
56 | 56 |
57 virtual bool asNewEffect(GrContext* context, const SkPaint& paint, | 57 virtual bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix*
, GrColor*, |
58 const SkMatrix* localMatrix, GrColor* paintColor, | 58 GrFragmentProcessor**) const SK_OVERRIDE; |
59 GrEffect** effect) const SK_OVERRIDE; | |
60 | 59 |
61 SK_TO_STRING_OVERRIDE() | 60 SK_TO_STRING_OVERRIDE() |
62 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader) | 61 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader) |
63 | 62 |
64 protected: | 63 protected: |
65 SkColorShader(SkReadBuffer&); | 64 SkColorShader(SkReadBuffer&); |
66 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 65 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
67 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_
OVERRIDE; | 66 virtual Context* onCreateContext(const ContextRec&, void* storage) const SK_
OVERRIDE; |
68 virtual bool onAsLuminanceColor(SkColor* lum) const SK_OVERRIDE { | 67 virtual bool onAsLuminanceColor(SkColor* lum) const SK_OVERRIDE { |
69 *lum = fColor; | 68 *lum = fColor; |
70 return true; | 69 return true; |
71 } | 70 } |
72 | 71 |
73 private: | 72 private: |
74 SkColor fColor; | 73 SkColor fColor; |
75 | 74 |
76 typedef SkShader INHERITED; | 75 typedef SkShader INHERITED; |
77 }; | 76 }; |
78 | 77 |
79 #endif | 78 #endif |
OLD | NEW |