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

Unified Diff: src/gpu/GrAAHairLinePathRenderer.cpp

Issue 14081016: Remove static effects from the effect memory pool. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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
Index: src/gpu/GrAAHairLinePathRenderer.cpp
===================================================================
--- src/gpu/GrAAHairLinePathRenderer.cpp (revision 8808)
+++ src/gpu/GrAAHairLinePathRenderer.cpp (working copy)
@@ -508,12 +508,9 @@
public:
static GrEffectRef* Create() {
- // we go through this so we only have one copy of each effect
- static SkAutoTUnref<GrEffectRef> gHairQuadEdgeEffectRef(
- CreateEffectRef(AutoEffectUnref(SkNEW(HairQuadEdgeEffect))));
-
- gHairQuadEdgeEffectRef.get()->ref();
- return gHairQuadEdgeEffectRef;
+ GR_CREATE_STATIC_EFFECT(gHairQuadEdgeEffect, HairQuadEdgeEffect, ());
+ gHairQuadEdgeEffect->ref();
+ return gHairQuadEdgeEffect;
}
virtual ~HairQuadEdgeEffect() {}
@@ -609,12 +606,9 @@
public:
static GrEffectRef* Create() {
- // we go through this so we only have one copy of each effect
- static SkAutoTUnref<GrEffectRef> gHairLineEdgeEffectRef(
- CreateEffectRef(AutoEffectUnref(SkNEW(HairLineEdgeEffect))));
-
- gHairLineEdgeEffectRef.get()->ref();
- return gHairLineEdgeEffectRef;
+ GR_CREATE_STATIC_EFFECT(gHairLineEdge, HairLineEdgeEffect, ());
+ gHairLineEdge->ref();
+ return gHairLineEdge;
}
virtual ~HairLineEdgeEffect() {}

Powered by Google App Engine
This is Rietveld 408576698