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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 public: | 466 public: |
467 | 467 |
468 GrGLRadialGradient(const GrProcessor&) {} | 468 GrGLRadialGradient(const GrProcessor&) {} |
469 virtual ~GrGLRadialGradient() { } | 469 virtual ~GrGLRadialGradient() { } |
470 | 470 |
471 virtual void emitCode(GrGLFPBuilder*, | 471 virtual void emitCode(GrGLFPBuilder*, |
472 const GrFragmentProcessor&, | 472 const GrFragmentProcessor&, |
473 const char* outputColor, | 473 const char* outputColor, |
474 const char* inputColor, | 474 const char* inputColor, |
475 const TransformedCoordsArray&, | 475 const TransformedCoordsArray&, |
476 const TextureSamplerArray&) SK_OVERRIDE; | 476 const TextureSamplerArray&) override; |
477 | 477 |
478 static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcesso
rKeyBuilder* b) { | 478 static void GenKey(const GrProcessor& processor, const GrGLCaps&, GrProcesso
rKeyBuilder* b) { |
479 b->add32(GenBaseGradientKey(processor)); | 479 b->add32(GenBaseGradientKey(processor)); |
480 } | 480 } |
481 | 481 |
482 private: | 482 private: |
483 | 483 |
484 typedef GrGLGradientEffect INHERITED; | 484 typedef GrGLGradientEffect INHERITED; |
485 | 485 |
486 }; | 486 }; |
487 | 487 |
488 ///////////////////////////////////////////////////////////////////// | 488 ///////////////////////////////////////////////////////////////////// |
489 | 489 |
490 class GrRadialGradient : public GrGradientEffect { | 490 class GrRadialGradient : public GrGradientEffect { |
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 const char* name() const SK_OVERRIDE { return "Radial Gradient"; } | 501 const char* name() const 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 override { |
505 GrGLRadialGradient::GenKey(*this, caps, b); | 505 GrGLRadialGradient::GenKey(*this, caps, b); |
506 } | 506 } |
507 | 507 |
508 GrGLFragmentProcessor* createGLInstance() const SK_OVERRIDE { | 508 GrGLFragmentProcessor* createGLInstance() const 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 |