OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
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 SkGradientShaderPriv_DEFINED | 8 #ifndef SkGradientShaderPriv_DEFINED |
9 #define SkGradientShaderPriv_DEFINED | 9 #define SkGradientShaderPriv_DEFINED |
10 | 10 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 static void initCache16(GradientShaderCache* cache); | 135 static void initCache16(GradientShaderCache* cache); |
136 static void initCache32(GradientShaderCache* cache); | 136 static void initCache32(GradientShaderCache* cache); |
137 | 137 |
138 static void Build16bitCache(uint16_t[], SkColor c0, SkColor c1, int coun
t); | 138 static void Build16bitCache(uint16_t[], SkColor c0, SkColor c1, int coun
t); |
139 static void Build32bitCache(SkPMColor[], SkColor c0, SkColor c1, int cou
nt, | 139 static void Build32bitCache(SkPMColor[], SkColor c0, SkColor c1, int cou
nt, |
140 U8CPU alpha, uint32_t gradFlags); | 140 U8CPU alpha, uint32_t gradFlags); |
141 }; | 141 }; |
142 | 142 |
143 class GradientShaderBaseContext : public SkShader::Context { | 143 class GradientShaderBaseContext : public SkShader::Context { |
144 public: | 144 public: |
145 GradientShaderBaseContext(const SkGradientShaderBase& shader, const SkBi
tmap& device, | 145 GradientShaderBaseContext(const SkGradientShaderBase& shader, const Cont
extRec&); |
146 const SkPaint& paint, const SkMatrix& matrix); | |
147 ~GradientShaderBaseContext() {} | |
148 | 146 |
149 virtual uint32_t getFlags() const SK_OVERRIDE { return fFlags; } | 147 virtual uint32_t getFlags() const SK_OVERRIDE { return fFlags; } |
150 | 148 |
151 protected: | 149 protected: |
152 SkMatrix fDstToIndex; | 150 SkMatrix fDstToIndex; |
153 SkMatrix::MapXYProc fDstToIndexProc; | 151 SkMatrix::MapXYProc fDstToIndexProc; |
154 uint8_t fDstToIndexClass; | 152 uint8_t fDstToIndexClass; |
155 uint8_t fFlags; | 153 uint8_t fFlags; |
156 | 154 |
157 SkAutoTUnref<GradientShaderCache> fCache; | 155 SkAutoTUnref<GradientShaderCache> fCache; |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 GrGLUniformManager::UniformHandle fColorStartUni; | 440 GrGLUniformManager::UniformHandle fColorStartUni; |
443 GrGLUniformManager::UniformHandle fColorMidUni; | 441 GrGLUniformManager::UniformHandle fColorMidUni; |
444 GrGLUniformManager::UniformHandle fColorEndUni; | 442 GrGLUniformManager::UniformHandle fColorEndUni; |
445 | 443 |
446 typedef GrGLEffect INHERITED; | 444 typedef GrGLEffect INHERITED; |
447 }; | 445 }; |
448 | 446 |
449 #endif | 447 #endif |
450 | 448 |
451 #endif | 449 #endif |
OLD | NEW |