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

Unified Diff: src/gpu/effects/GrOvalEffect.cpp

Issue 374923002: Goodbye GrEffectRef. (Closed) Base URL: https://skia.googlesource.com/skia.git@noref3
Patch Set: Address comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrDitherEffect.cpp ('k') | src/gpu/effects/GrRRectEffect.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrOvalEffect.cpp
diff --git a/src/gpu/effects/GrOvalEffect.cpp b/src/gpu/effects/GrOvalEffect.cpp
index 678abd0c381746c569404746d5d85efbe1b22bc2..ddda4b902a126a9f54933ddb13aac94ff3c6f6c6 100644
--- a/src/gpu/effects/GrOvalEffect.cpp
+++ b/src/gpu/effects/GrOvalEffect.cpp
@@ -19,7 +19,7 @@ class GLCircleEffect;
class CircleEffect : public GrEffect {
public:
- static GrEffectRef* Create(GrEffectEdgeType, const SkPoint& center, SkScalar radius);
+ static GrEffect* Create(GrEffectEdgeType, const SkPoint& center, SkScalar radius);
virtual ~CircleEffect() {};
static const char* Name() { return "Circle"; }
@@ -49,9 +49,7 @@ private:
typedef GrEffect INHERITED;
};
-GrEffectRef* CircleEffect::Create(GrEffectEdgeType edgeType,
- const SkPoint& center,
- SkScalar radius) {
+GrEffect* CircleEffect::Create(GrEffectEdgeType edgeType, const SkPoint& center, SkScalar radius) {
SkASSERT(radius >= 0);
return SkNEW_ARGS(CircleEffect, (edgeType, center, radius));
}
@@ -80,10 +78,10 @@ bool CircleEffect::onIsEqual(const GrEffect& other) const {
GR_DEFINE_EFFECT_TEST(CircleEffect);
-GrEffectRef* CircleEffect::TestCreate(SkRandom* random,
- GrContext*,
- const GrDrawTargetCaps& caps,
- GrTexture*[]) {
+GrEffect* CircleEffect::TestCreate(SkRandom* random,
+ GrContext*,
+ const GrDrawTargetCaps& caps,
+ GrTexture*[]) {
SkPoint center;
center.fX = random->nextRangeScalar(0.f, 1000.f);
center.fY = random->nextRangeScalar(0.f, 1000.f);
@@ -189,7 +187,7 @@ class GLEllipseEffect;
class EllipseEffect : public GrEffect {
public:
- static GrEffectRef* Create(GrEffectEdgeType, const SkPoint& center, SkScalar rx, SkScalar ry);
+ static GrEffect* Create(GrEffectEdgeType, const SkPoint& center, SkScalar rx, SkScalar ry);
virtual ~EllipseEffect() {};
static const char* Name() { return "Ellipse"; }
@@ -219,10 +217,10 @@ private:
typedef GrEffect INHERITED;
};
-GrEffectRef* EllipseEffect::Create(GrEffectEdgeType edgeType,
- const SkPoint& center,
- SkScalar rx,
- SkScalar ry) {
+GrEffect* EllipseEffect::Create(GrEffectEdgeType edgeType,
+ const SkPoint& center,
+ SkScalar rx,
+ SkScalar ry) {
SkASSERT(rx >= 0 && ry >= 0);
return SkNEW_ARGS(EllipseEffect, (edgeType, center, rx, ry));
}
@@ -251,10 +249,10 @@ bool EllipseEffect::onIsEqual(const GrEffect& other) const {
GR_DEFINE_EFFECT_TEST(EllipseEffect);
-GrEffectRef* EllipseEffect::TestCreate(SkRandom* random,
- GrContext*,
- const GrDrawTargetCaps& caps,
- GrTexture*[]) {
+GrEffect* EllipseEffect::TestCreate(SkRandom* random,
+ GrContext*,
+ const GrDrawTargetCaps& caps,
+ GrTexture*[]) {
SkPoint center;
center.fX = random->nextRangeScalar(0.f, 1000.f);
center.fY = random->nextRangeScalar(0.f, 1000.f);
@@ -366,7 +364,7 @@ void GLEllipseEffect::setData(const GrGLUniformManager& uman, const GrDrawEffect
//////////////////////////////////////////////////////////////////////////////
-GrEffectRef* GrOvalEffect::Create(GrEffectEdgeType edgeType, const SkRect& oval) {
+GrEffect* GrOvalEffect::Create(GrEffectEdgeType edgeType, const SkRect& oval) {
if (kHairlineAA_GrEffectEdgeType == edgeType) {
return NULL;
}
« no previous file with comments | « src/gpu/effects/GrDitherEffect.cpp ('k') | src/gpu/effects/GrRRectEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698