Implement stroking a path with nv_path_rendering

Initialize the path stroke properties in the GrGLPath constructor.
Use StencilStrokePath and CoverStrokePath to stroke the path.

The order of the GL calls is:
1. StencilFill, if needed
2. StencilStroke, if needed
2a. CoverStroke, if stroke was applied
2b. CoverFill, if stroke was not applied

The reason for not pairing StencilFill + CoverFill, StencilStroke +
CoverStroke is that Skia API does not allow separate fill and stroke
color within one call. Covering the stroke bounding box should also
cover the fill bounding box.

Causes different rendering in gm/dashcubics due to different rendering
algorithm. (?) (TODO: this should be resolved somehow.)

R=bsalomon@google.com, markkilgard@gmail.com, cdalton@nvidia.com

Author: kkinnunen@nvidia.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@11672 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 64eedfb..fa2223d 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -517,20 +517,18 @@
     }
 }
 
-void GrDrawTarget::stencilPath(const GrPath* path, const SkStrokeRec& stroke, SkPath::FillType fill) {
+void GrDrawTarget::stencilPath(const GrPath* path, SkPath::FillType fill) {
     // TODO: extract portions of checkDraw that are relevant to path stenciling.
     SkASSERT(NULL != path);
     SkASSERT(this->caps()->pathRenderingSupport());
-    SkASSERT(!stroke.isHairlineStyle());
     SkASSERT(!SkPath::IsInverseFillType(fill));
-    this->onStencilPath(path, stroke, fill);
+    this->onStencilPath(path, fill);
 }
 
-void GrDrawTarget::fillPath(const GrPath* path, const SkStrokeRec& stroke, SkPath::FillType fill) {
+void GrDrawTarget::drawPath(const GrPath* path, SkPath::FillType fill) {
     // TODO: extract portions of checkDraw that are relevant to path rendering.
     SkASSERT(NULL != path);
     SkASSERT(this->caps()->pathRenderingSupport());
-    SkASSERT(!stroke.isHairlineStyle());
     const GrDrawState* drawState = &getDrawState();
 
     SkRect devBounds;
@@ -548,7 +546,7 @@
         return;
     }
 
-    this->onFillPath(path, stroke, fill, dstCopy.texture() ? &dstCopy : NULL);
+    this->onDrawPath(path, fill, dstCopy.texture() ? &dstCopy : NULL);
 }
 
 ////////////////////////////////////////////////////////////////////////////////