| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 uint32_t fFlags; | 44 uint32_t fFlags; |
| 45 uint16_t fColor16; | 45 uint16_t fColor16; |
| 46 | 46 |
| 47 typedef SkShader::Context INHERITED; | 47 typedef SkShader::Context INHERITED; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 GradientType asAGradient(GradientInfo* info) const override; | 50 GradientType asAGradient(GradientInfo* info) const override; |
| 51 | 51 |
| 52 #if SK_SUPPORT_GPU | 52 #if SK_SUPPORT_GPU |
| 53 const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& v
iewM, | 53 const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& v
iewM, |
| 54 const SkMatrix*, SkFilterQual
ity) const override; | 54 const SkMatrix*, SkFilterQual
ity, |
| 55 GrRenderTarget* dst) const ov
erride; |
| 55 #endif | 56 #endif |
| 56 | 57 |
| 57 SK_TO_STRING_OVERRIDE() | 58 SK_TO_STRING_OVERRIDE() |
| 58 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader) | 59 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorShader) |
| 59 | 60 |
| 60 protected: | 61 protected: |
| 61 SkColorShader(SkReadBuffer&); | 62 SkColorShader(SkReadBuffer&); |
| 62 void flatten(SkWriteBuffer&) const override; | 63 void flatten(SkWriteBuffer&) const override; |
| 63 Context* onCreateContext(const ContextRec&, void* storage) const override; | 64 Context* onCreateContext(const ContextRec&, void* storage) const override; |
| 64 bool onAsLuminanceColor(SkColor* lum) const override { | 65 bool onAsLuminanceColor(SkColor* lum) const override { |
| 65 *lum = fColor; | 66 *lum = fColor; |
| 66 return true; | 67 return true; |
| 67 } | 68 } |
| 68 | 69 |
| 69 private: | 70 private: |
| 70 SkColor fColor; | 71 SkColor fColor; |
| 71 | 72 |
| 72 typedef SkShader INHERITED; | 73 typedef SkShader INHERITED; |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 #endif | 76 #endif |
| OLD | NEW |