diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/GrAAConvexPathRenderer.cpp | 9 | ||||
-rw-r--r-- | src/gpu/GrAAHairLinePathRenderer.cpp | 18 |
2 files changed, 12 insertions, 15 deletions
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp index ca5addcec9..1ef991ef59 100644 --- a/src/gpu/GrAAConvexPathRenderer.cpp +++ b/src/gpu/GrAAConvexPathRenderer.cpp @@ -451,11 +451,10 @@ public: static GrEffectRef* Create() { // we go through this so we only have one copy of each effect - static GrEffectRef* gQuadEdgeEffectRef = - CreateEffectRef(AutoEffectUnref(SkNEW(QuadEdgeEffect))); - static SkAutoTUnref<GrEffectRef> gUnref(gQuadEdgeEffectRef); + static SkAutoTUnref<GrEffectRef> gQuadEdgeEffectRef( + CreateEffectRef(AutoEffectUnref(SkNEW(QuadEdgeEffect)))); - gQuadEdgeEffectRef->ref(); + gQuadEdgeEffectRef.get()->ref(); return gQuadEdgeEffectRef; } @@ -524,7 +523,7 @@ public: private: typedef GrGLEffect INHERITED; }; - + private: QuadEdgeEffect() { this->addVertexAttrib(kVec4f_GrSLType); diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp index fdb6009857..08a4111a24 100644 --- a/src/gpu/GrAAHairLinePathRenderer.cpp +++ b/src/gpu/GrAAHairLinePathRenderer.cpp @@ -509,11 +509,10 @@ public: 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 @@ public: 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; } |