Fix for effect cache key.
Adds the additional shift needed to incorporate the attribKeyBits. Also simplifies the creation of the static globals for the edge effects.
Author: jvanverth@google.com
Reviewed By: bsalomon@google.com
Review URL: https://chromiumcodereview.appspot.com/13465019
git-svn-id: http://skia.googlecode.com/svn/trunk@8498 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index ca5addc..1ef991e 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -451,11 +451,10 @@
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 @@
private:
typedef GrGLEffect INHERITED;
};
-
+
private:
QuadEdgeEffect() {
this->addVertexAttrib(kVec4f_GrSLType);