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

Side by Side Diff: src/effects/gradients/SkSweepGradient.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
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 "SkSweepGradient.h" 9 #include "SkSweepGradient.h"
10 10
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 201
202 }; 202 };
203 203
204 ///////////////////////////////////////////////////////////////////// 204 /////////////////////////////////////////////////////////////////////
205 205
206 class GrSweepGradient : public GrGradientEffect { 206 class GrSweepGradient : public GrGradientEffect {
207 public: 207 public:
208 static GrEffectRef* Create(GrContext* ctx, 208 static GrEffectRef* Create(GrContext* ctx,
209 const SkSweepGradient& shader, 209 const SkSweepGradient& shader,
210 const SkMatrix& matrix) { 210 const SkMatrix& matrix) {
211 AutoEffectUnref effect(SkNEW_ARGS(GrSweepGradient, (ctx, shader, matrix) )); 211 return SkNEW_ARGS(GrSweepGradient, (ctx, shader, matrix));
212 return CreateEffectRef(effect);
213 } 212 }
214 virtual ~GrSweepGradient() { } 213 virtual ~GrSweepGradient() { }
215 214
216 static const char* Name() { return "Sweep Gradient"; } 215 static const char* Name() { return "Sweep Gradient"; }
217 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE { 216 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE {
218 return GrTBackendEffectFactory<GrSweepGradient>::getInstance(); 217 return GrTBackendEffectFactory<GrSweepGradient>::getInstance();
219 } 218 }
220 219
221 typedef GrGLSweepGradient GLEffect; 220 typedef GrGLSweepGradient GLEffect;
222 221
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 str->appendScalar(fCenter.fX); 324 str->appendScalar(fCenter.fX);
326 str->append(", "); 325 str->append(", ");
327 str->appendScalar(fCenter.fY); 326 str->appendScalar(fCenter.fY);
328 str->append(") "); 327 str->append(") ");
329 328
330 this->INHERITED::toString(str); 329 this->INHERITED::toString(str);
331 330
332 str->append(")"); 331 str->append(")");
333 } 332 }
334 #endif 333 #endif
OLDNEW
« no previous file with comments | « src/effects/gradients/SkRadialGradient.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698