| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 }; | 486 }; |
| 487 | 487 |
| 488 ///////////////////////////////////////////////////////////////////// | 488 ///////////////////////////////////////////////////////////////////// |
| 489 | 489 |
| 490 class GrRadialGradient : public GrGradientEffect { | 490 class GrRadialGradient : public GrGradientEffect { |
| 491 public: | 491 public: |
| 492 static GrEffectRef* Create(GrContext* ctx, | 492 static GrEffectRef* 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 AutoEffectUnref effect(SkNEW_ARGS(GrRadialGradient, (ctx, shader, matrix
, tm))); | 496 return SkNEW_ARGS(GrRadialGradient, (ctx, shader, matrix, tm)); |
| 497 return CreateEffectRef(effect); | |
| 498 } | 497 } |
| 499 | 498 |
| 500 virtual ~GrRadialGradient() { } | 499 virtual ~GrRadialGradient() { } |
| 501 | 500 |
| 502 static const char* Name() { return "Radial Gradient"; } | 501 static const char* Name() { return "Radial Gradient"; } |
| 503 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE { | 502 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE { |
| 504 return GrTBackendEffectFactory<GrRadialGradient>::getInstance(); | 503 return GrTBackendEffectFactory<GrRadialGradient>::getInstance(); |
| 505 } | 504 } |
| 506 | 505 |
| 507 typedef GrGLRadialGradient GLEffect; | 506 typedef GrGLRadialGradient GLEffect; |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 str->appendScalar(fCenter.fY); | 607 str->appendScalar(fCenter.fY); |
| 609 str->append(") radius: "); | 608 str->append(") radius: "); |
| 610 str->appendScalar(fRadius); | 609 str->appendScalar(fRadius); |
| 611 str->append(" "); | 610 str->append(" "); |
| 612 | 611 |
| 613 this->INHERITED::toString(str); | 612 this->INHERITED::toString(str); |
| 614 | 613 |
| 615 str->append(")"); | 614 str->append(")"); |
| 616 } | 615 } |
| 617 #endif | 616 #endif |
| OLD | NEW |