Vertex Attrib configurations now handled as pointers vs. SkSTArrays

https://codereview.chromium.org/14328009/



git-svn-id: http://skia.googlecode.com/svn/trunk@8787 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp
index 22964e5..d7d19a3 100644
--- a/src/gpu/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/GrAAConvexPathRenderer.cpp
@@ -558,6 +558,16 @@
             stroke.isFillStyle() && !path.isInverseFillType() && path.isConvex());
 }
 
+namespace {
+
+// position + edge
+extern const GrVertexAttrib gPathAttribs[] = {
+    {kVec2f_GrVertexAttribType, 0,               kPosition_GrVertexAttribBinding},
+    {kVec4f_GrVertexAttribType, sizeof(GrPoint), kEffect_GrVertexAttribBinding}
+};
+
+};
+
 bool GrAAConvexPathRenderer::onDrawPath(const SkPath& origPath,
                                         const SkStrokeRec&,
                                         GrDrawTarget* target,
@@ -602,12 +612,7 @@
         return false;
     }
 
-    // position + edge
-    static const GrVertexAttrib kAttribs[] = {
-        {kVec2f_GrVertexAttribType, 0,               kPosition_GrVertexAttribBinding},
-        {kVec4f_GrVertexAttribType, sizeof(GrPoint), kEffect_GrVertexAttribBinding}
-    };
-    drawState->setVertexAttribs(kAttribs, SK_ARRAY_COUNT(kAttribs));
+    drawState->setVertexAttribs<gPathAttribs>(SK_ARRAY_COUNT(gPathAttribs));
 
     enum {
         // the edge effects share this stage with glyph rendering