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

Unified Diff: src/gpu/GrAAHairLinePathRenderer.cpp

Issue 13465019: Fix for effect cache key (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 9 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/GrAAConvexPathRenderer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAAHairLinePathRenderer.cpp
===================================================================
--- src/gpu/GrAAHairLinePathRenderer.cpp (revision 8496)
+++ src/gpu/GrAAHairLinePathRenderer.cpp (working copy)
@@ -509,11 +509,10 @@
static GrEffectRef* Create() {
// we go through this so we only have one copy of each effect
- static GrEffectRef* gHairQuadEdgeEffectRef =
- CreateEffectRef(AutoEffectUnref(SkNEW(HairQuadEdgeEffect)));
- static SkAutoTUnref<GrEffectRef> gUnref(gHairQuadEdgeEffectRef);
-
- gHairQuadEdgeEffectRef->ref();
+ static SkAutoTUnref<GrEffectRef> gHairQuadEdgeEffectRef(
+ CreateEffectRef(AutoEffectUnref(SkNEW(HairQuadEdgeEffect))));
+
+ gHairQuadEdgeEffectRef.get()->ref();
return gHairQuadEdgeEffectRef;
}
@@ -611,11 +610,10 @@
static GrEffectRef* Create() {
// we go through this so we only have one copy of each effect
- static GrEffectRef* gHairLineEdgeEffectRef =
- CreateEffectRef(AutoEffectUnref(SkNEW(HairLineEdgeEffect)));
- static SkAutoTUnref<GrEffectRef> gUnref(gHairLineEdgeEffectRef);
-
- gHairLineEdgeEffectRef->ref();
+ static SkAutoTUnref<GrEffectRef> gHairLineEdgeEffectRef(
+ CreateEffectRef(AutoEffectUnref(SkNEW(HairLineEdgeEffect))));
+
+ gHairLineEdgeEffectRef.get()->ref();
return gHairLineEdgeEffectRef;
}
« no previous file with comments | « src/gpu/GrAAConvexPathRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698