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

Unified Diff: src/gpu/effects/GrConvexPolyEffect.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/GrConvexPolyEffect.h ('k') | src/gpu/effects/GrConvolutionEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrConvexPolyEffect.cpp
diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp
index aebd5b0b8990ede7d5f0656f4a8b7a01ab330365..49521ca13b79078db01994ae32caddcb756d3763 100644
--- a/src/gpu/effects/GrConvexPolyEffect.cpp
+++ b/src/gpu/effects/GrConvexPolyEffect.cpp
@@ -24,7 +24,7 @@ public:
static const char* Name() { return "AARect"; }
- static GrEffectRef* Create(GrEffectEdgeType edgeType, const SkRect& rect) {
+ static GrEffect* Create(GrEffectEdgeType edgeType, const SkRect& rect) {
return SkNEW_ARGS(AARectEffect, (edgeType, rect));
}
@@ -64,15 +64,15 @@ private:
GR_DEFINE_EFFECT_TEST(AARectEffect);
-GrEffectRef* AARectEffect::TestCreate(SkRandom* random,
- GrContext*,
- const GrDrawTargetCaps& caps,
- GrTexture*[]) {
+GrEffect* AARectEffect::TestCreate(SkRandom* random,
+ GrContext*,
+ const GrDrawTargetCaps& caps,
+ GrTexture*[]) {
SkRect rect = SkRect::MakeLTRB(random->nextSScalar1(),
random->nextSScalar1(),
random->nextSScalar1(),
random->nextSScalar1());
- GrEffectRef* effect;
+ GrEffect* effect;
do {
GrEffectEdgeType edgeType = static_cast<GrEffectEdgeType>(random->nextULessThan(
kGrEffectEdgeTypeCnt));
@@ -262,7 +262,8 @@ GrGLEffect::EffectKey GrGLConvexPolyEffect::GenKey(const GrDrawEffect& drawEffec
//////////////////////////////////////////////////////////////////////////////
-GrEffectRef* GrConvexPolyEffect::Create(GrEffectEdgeType type, const SkPath& path, const SkVector* offset) {
+GrEffect* GrConvexPolyEffect::Create(GrEffectEdgeType type, const SkPath& path,
+ const SkVector* offset) {
if (kHairlineAA_GrEffectEdgeType == type) {
return NULL;
}
@@ -312,7 +313,7 @@ GrEffectRef* GrConvexPolyEffect::Create(GrEffectEdgeType type, const SkPath& pat
return Create(type, n, edges);
}
-GrEffectRef* GrConvexPolyEffect::Create(GrEffectEdgeType edgeType, const SkRect& rect) {
+GrEffect* GrConvexPolyEffect::Create(GrEffectEdgeType edgeType, const SkRect& rect) {
if (kHairlineAA_GrEffectEdgeType == edgeType){
return NULL;
}
@@ -354,17 +355,17 @@ bool GrConvexPolyEffect::onIsEqual(const GrEffect& other) const {
GR_DEFINE_EFFECT_TEST(GrConvexPolyEffect);
-GrEffectRef* GrConvexPolyEffect::TestCreate(SkRandom* random,
- GrContext*,
- const GrDrawTargetCaps& caps,
- GrTexture*[]) {
+GrEffect* GrConvexPolyEffect::TestCreate(SkRandom* random,
+ GrContext*,
+ const GrDrawTargetCaps& caps,
+ GrTexture*[]) {
int count = random->nextULessThan(kMaxEdges) + 1;
SkScalar edges[kMaxEdges * 3];
for (int i = 0; i < 3 * count; ++i) {
edges[i] = random->nextSScalar1();
}
- GrEffectRef* effect;
+ GrEffect* effect;
do {
GrEffectEdgeType edgeType = static_cast<GrEffectEdgeType>(
random->nextULessThan(kGrEffectEdgeTypeCnt));
« no previous file with comments | « src/gpu/effects/GrConvexPolyEffect.h ('k') | src/gpu/effects/GrConvolutionEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698