Make it possible to draw multiple paths at once to a draw target

Add interface to draw multiple paths in a single "command" to a draw
target. Implement this interface in GrGpuGL with NVPR "instanced"
calls.

The instanced calls accept list of paths and list of transformations as
their parameters. The transformations are at this moment expected to be
2d affine transformations, as the functions are called only for text
rendering.

This will be used when drawing fonts. Later it can be maybe be used in
GrInOrderDrawBuffer to aggregate many draw calls into one instanced draw
call, similar to drawing rects.

R=jvanverth@google.com, bsalomon@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/209413006

git-svn-id: http://skia.googlecode.com/svn/trunk@13930 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 00791be..e8ccc26 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -337,6 +337,7 @@
         kDrawTriangles_DrawType,
         kStencilPath_DrawType,
         kDrawPath_DrawType,
+        kDrawPaths_DrawType,
     };
 
     DrawType PrimTypeToDrawType(GrPrimitiveType type) {
@@ -438,6 +439,8 @@
     // overridden by backend-specific derived class to perform the path stenciling.
     virtual void onGpuStencilPath(const GrPath*, SkPath::FillType) = 0;
     virtual void onGpuDrawPath(const GrPath*, SkPath::FillType) = 0;
+    virtual void onGpuDrawPaths(size_t, const GrPath**, const SkMatrix*,
+                                SkPath::FillType, SkStrokeRec::Style) = 0;
 
     // overridden by backend-specific derived class to perform flush
     virtual void onForceRenderTargetFlush() = 0;
@@ -483,6 +486,9 @@
     virtual void onStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
     virtual void onDrawPath(const GrPath*, SkPath::FillType,
                             const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
+    virtual void onDrawPaths(size_t, const GrPath**, const SkMatrix*,
+                             SkPath::FillType, SkStrokeRec::Style,
+                             const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
 
     // readies the pools to provide vertex/index data.
     void prepareVertexPool();