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 "SkRadialGradient.h" | 9 #include "SkRadialGradient.h" |
10 #include "SkRadialGradient_Table.h" | 10 #include "SkRadialGradient_Table.h" |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 public: | 491 public: |
492 static GrFragmentProcessor* Create(GrContext* ctx, | 492 static GrFragmentProcessor* Create(GrContext* ctx, |
493 const SkRadialGradient& shader, | 493 const SkRadialGradient& shader, |
494 const SkMatrix& matrix, | 494 const SkMatrix& matrix, |
495 SkShader::TileMode tm) { | 495 SkShader::TileMode tm) { |
496 return SkNEW_ARGS(GrRadialGradient, (ctx, shader, matrix, tm)); | 496 return SkNEW_ARGS(GrRadialGradient, (ctx, shader, matrix, tm)); |
497 } | 497 } |
498 | 498 |
499 virtual ~GrRadialGradient() { } | 499 virtual ~GrRadialGradient() { } |
500 | 500 |
501 virtual const char* name() const SK_OVERRIDE { return "Radial Gradient"; } | 501 const char* name() const SK_OVERRIDE { return "Radial Gradient"; } |
502 | 502 |
503 virtual void getGLProcessorKey(const GrGLCaps& caps, | 503 virtual void getGLProcessorKey(const GrGLCaps& caps, |
504 GrProcessorKeyBuilder* b) const SK_OVERRIDE { | 504 GrProcessorKeyBuilder* b) const SK_OVERRIDE { |
505 GrGLRadialGradient::GenKey(*this, caps, b); | 505 GrGLRadialGradient::GenKey(*this, caps, b); |
506 } | 506 } |
507 | 507 |
508 virtual GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { | 508 GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { |
509 return SkNEW_ARGS(GrGLRadialGradient, (*this)); | 509 return SkNEW_ARGS(GrGLRadialGradient, (*this)); |
510 } | 510 } |
511 | 511 |
512 private: | 512 private: |
513 GrRadialGradient(GrContext* ctx, | 513 GrRadialGradient(GrContext* ctx, |
514 const SkRadialGradient& shader, | 514 const SkRadialGradient& shader, |
515 const SkMatrix& matrix, | 515 const SkMatrix& matrix, |
516 SkShader::TileMode tm) | 516 SkShader::TileMode tm) |
517 : INHERITED(ctx, shader, matrix, tm) { | 517 : INHERITED(ctx, shader, matrix, tm) { |
518 this->initClassID<GrRadialGradient>(); | 518 this->initClassID<GrRadialGradient>(); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 str->appendScalar(fCenter.fY); | 615 str->appendScalar(fCenter.fY); |
616 str->append(") radius: "); | 616 str->append(") radius: "); |
617 str->appendScalar(fRadius); | 617 str->appendScalar(fRadius); |
618 str->append(" "); | 618 str->append(" "); |
619 | 619 |
620 this->INHERITED::toString(str); | 620 this->INHERITED::toString(str); |
621 | 621 |
622 str->append(")"); | 622 str->append(")"); |
623 } | 623 } |
624 #endif | 624 #endif |
OLD | NEW |