OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
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 #include "SkSweepGradient.h" | 9 #include "SkSweepGradient.h" |
10 | 10 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 const char* name() const override { return "Sweep Gradient"; } | 201 const char* name() const override { return "Sweep Gradient"; } |
202 | 202 |
203 private: | 203 private: |
204 GrSweepGradient(GrContext* ctx, | 204 GrSweepGradient(GrContext* ctx, |
205 const SkSweepGradient& shader, | 205 const SkSweepGradient& shader, |
206 const SkMatrix& matrix) | 206 const SkMatrix& matrix) |
207 : INHERITED(ctx, shader, matrix, SkShader::kClamp_TileMode) { | 207 : INHERITED(ctx, shader, matrix, SkShader::kClamp_TileMode) { |
208 this->initClassID<GrSweepGradient>(); | 208 this->initClassID<GrSweepGradient>(); |
209 } | 209 } |
210 | 210 |
211 GrGLSLFragmentProcessor* onCreateGLInstance() const override { | 211 GrGLSLFragmentProcessor* onCreateGLSLInstance() const override { |
212 return new GrGLSweepGradient(*this); | 212 return new GrGLSweepGradient(*this); |
213 } | 213 } |
214 | 214 |
215 virtual void onGetGLProcessorKey(const GrGLSLCaps& caps, | 215 virtual void onGetGLSLProcessorKey(const GrGLSLCaps& caps, |
216 GrProcessorKeyBuilder* b) const override { | 216 GrProcessorKeyBuilder* b) const override
{ |
217 GrGLSweepGradient::GenKey(*this, caps, b); | 217 GrGLSweepGradient::GenKey(*this, caps, b); |
218 } | 218 } |
219 | 219 |
220 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 220 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
221 | 221 |
222 typedef GrGradientEffect INHERITED; | 222 typedef GrGradientEffect INHERITED; |
223 }; | 223 }; |
224 | 224 |
225 ///////////////////////////////////////////////////////////////////// | 225 ///////////////////////////////////////////////////////////////////// |
226 | 226 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 str->appendScalar(fCenter.fX); | 301 str->appendScalar(fCenter.fX); |
302 str->append(", "); | 302 str->append(", "); |
303 str->appendScalar(fCenter.fY); | 303 str->appendScalar(fCenter.fY); |
304 str->append(") "); | 304 str->append(") "); |
305 | 305 |
306 this->INHERITED::toString(str); | 306 this->INHERITED::toString(str); |
307 | 307 |
308 str->append(")"); | 308 str->append(")"); |
309 } | 309 } |
310 #endif | 310 #endif |
OLD | NEW |