Separate GL path rendering state from GrGpuGL to GrGLPathRendering

Separate GL path rendering state from GrGpuGL to GrGLPathRendering. This
makes GrGpuGL code simpler.

The intention is that while GrGpuGL represents the global environment for GL,
the GrGLPathRendering represents the global environment for path rendering
extension.

Add GrPathRendering, a base class for path rendering, and inherit
GrGLPathRendering from that. Move the path rendering virtual functions from
GrGpu to GrPathRendering.

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

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/452823002
diff --git a/src/gpu/GrStencilAndCoverTextContext.cpp b/src/gpu/GrStencilAndCoverTextContext.cpp
index ff7c23e..af4ba64 100644
--- a/src/gpu/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/GrStencilAndCoverTextContext.cpp
@@ -155,7 +155,7 @@
     SkAutoGlyphCache autoCache(fSkPaint, &fDeviceProperties, glyphCacheTransform);
     fGlyphCache = autoCache.getCache();
     fGlyphs = GlyphPathRange::Create(fContext, fGlyphCache, fStroke);
-    fTransformType = GrDrawTarget::kTranslate_PathTransformType;
+    fTransformType = GrPathRendering::kTranslate_PathTransformType;
 
     const char* stop = text + byteLength;
 
@@ -243,7 +243,7 @@
 
     if (SkPaint::kLeft_Align == fSkPaint.getTextAlign()) {
         if (1 == scalarsPerPosition) {
-            fTransformType = GrDrawTarget::kTranslateX_PathTransformType;
+            fTransformType = GrPathRendering::kTranslateX_PathTransformType;
             while (text < stop) {
                 const SkGlyph& glyph = glyphCacheProc(fGlyphCache, &text, 0, 0);
                 if (glyph.fWidth) {
@@ -253,7 +253,7 @@
             }
         } else {
             SkASSERT(2 == scalarsPerPosition);
-            fTransformType = GrDrawTarget::kTranslate_PathTransformType;
+            fTransformType = GrPathRendering::kTranslate_PathTransformType;
             while (text < stop) {
                 const SkGlyph& glyph = glyphCacheProc(fGlyphCache, &text, 0, 0);
                 if (glyph.fWidth) {
@@ -263,7 +263,7 @@
             }
         }
     } else {
-        fTransformType = GrDrawTarget::kTranslate_PathTransformType;
+        fTransformType = GrPathRendering::kTranslate_PathTransformType;
         SkTextMapStateProc tmsProc(SkMatrix::I(), 0, scalarsPerPosition);
         SkTextAlignProcScalar alignProc(fSkPaint.getTextAlign());
         while (text < stop) {
@@ -396,7 +396,7 @@
 }
 
 inline void GrStencilAndCoverTextContext::appendGlyph(uint16_t glyphID, float x) {
-    SkASSERT(GrDrawTarget::kTranslateX_PathTransformType == fTransformType);
+    SkASSERT(GrPathRendering::kTranslateX_PathTransformType == fTransformType);
 
     if (fPendingGlyphCount >= kGlyphBufferSize) {
         this->flush();
@@ -411,7 +411,7 @@
 }
 
 inline void GrStencilAndCoverTextContext::appendGlyph(uint16_t glyphID, float x, float y) {
-    SkASSERT(GrDrawTarget::kTranslate_PathTransformType == fTransformType);
+    SkASSERT(GrPathRendering::kTranslate_PathTransformType == fTransformType);
 
     if (fPendingGlyphCount >= kGlyphBufferSize) {
         this->flush();