Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: src/effects/gradients/SkRadialGradient.cpp

Issue 371103003: Remove GrEffect::CreateEffectRef and GrEffect::AutoEffectRef. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_ref2
Patch Set: Address comments and update for new YUV effect Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/effects/gradients/SkLinearGradient.cpp ('k') | src/effects/gradients/SkSweepGradient.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/effects/gradients/SkLinearGradient.cpp ('k') | src/effects/gradients/SkSweepGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698