diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index d971f58..f31e0b2 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -59,7 +59,7 @@
     : fDrawingManager(drawingMgr)
     , fRenderTarget(rt)
     , fDrawTarget(SkSafeRef(rt->getLastDrawTarget()))
-    , fTextContext(nullptr)
+    , fAtlasTextContext(nullptr)
     , fContext(context)
     , fSurfaceProps(SkSurfacePropsCopyOrDefault(surfaceProps))
     , fAuditTrail(auditTrail)
@@ -116,12 +116,12 @@
     SkDEBUGCODE(this->validate();)
     GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawText");
 
-    if (!fTextContext) {
-        fTextContext = fDrawingManager->textContext(fSurfaceProps, fRenderTarget);
+    if (!fAtlasTextContext) {
+        fAtlasTextContext = GrAtlasTextContext::Create();
     }
 
-    fTextContext->drawText(fContext, this, clip, grPaint, skPaint, viewMatrix, fSurfaceProps,
-                           text, byteLength, x, y, clipBounds);
+    fAtlasTextContext->drawText(fContext, this, clip, grPaint, skPaint, viewMatrix, fSurfaceProps,
+                                text, byteLength, x, y, clipBounds);
 }
 
 void GrDrawContext::drawPosText(const GrClip& clip, const GrPaint& grPaint,
@@ -135,12 +135,13 @@
     SkDEBUGCODE(this->validate();)
     GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawPosText");
 
-    if (!fTextContext) {
-        fTextContext = fDrawingManager->textContext(fSurfaceProps, fRenderTarget);
+    if (!fAtlasTextContext) {
+        fAtlasTextContext = GrAtlasTextContext::Create();
     }
 
-    fTextContext->drawPosText(fContext, this, clip, grPaint, skPaint, viewMatrix, fSurfaceProps,
-                              text, byteLength, pos, scalarsPerPosition, offset, clipBounds);
+    fAtlasTextContext->drawPosText(fContext, this, clip, grPaint, skPaint, viewMatrix,
+                                   fSurfaceProps, text, byteLength, pos, scalarsPerPosition,
+                                   offset, clipBounds);
 
 }
 
@@ -153,12 +154,12 @@
     SkDEBUGCODE(this->validate();)
     GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrDrawContext::drawTextBlob");
 
-    if (!fTextContext) {
-        fTextContext = fDrawingManager->textContext(fSurfaceProps, fRenderTarget);
+    if (!fAtlasTextContext) {
+        fAtlasTextContext = GrAtlasTextContext::Create();
     }
 
-    fTextContext->drawTextBlob(fContext, this, clip, skPaint, viewMatrix, fSurfaceProps, blob, x,
-                               y, filter, clipBounds);
+    fAtlasTextContext->drawTextBlob(fContext, this, clip, skPaint, viewMatrix, fSurfaceProps, blob,
+                                    x, y, filter, clipBounds);
 }
 
 void GrDrawContext::discard() {
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index a063c39..ca50fe4 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -8,6 +8,7 @@
 #include "GrDrawContext.h"
 #include "GrDrawingManager.h"
 #include "GrDrawTarget.h"
+#include "GrPathRenderingDrawContext.h"
 #include "GrResourceProvider.h"
 #include "GrSoftwarePathRenderer.h"
 #include "SkTTopoSort.h"
@@ -28,12 +29,6 @@
 
     fDrawTargets.reset();
 
-    delete fNVPRTextContext;
-    fNVPRTextContext = nullptr;
-
-    delete fAtlasTextContext;
-    fAtlasTextContext = nullptr;
-
     delete fPathRendererChain;
     fPathRendererChain = nullptr;
     SkSafeSetNull(fSoftwarePathRenderer);
@@ -114,32 +109,6 @@
     fFlushing = false;
 }
 
-GrTextContext* GrDrawingManager::textContext(const SkSurfaceProps& props, GrRenderTarget* rt) {
-    if (this->abandoned()) {
-        return nullptr;
-    }
-
-    bool useDIF = props.isUseDeviceIndependentFonts();
-
-    if (useDIF && fContext->caps()->shaderCaps()->pathRenderingSupport() &&
-        rt->isStencilBufferMultisampled()) {
-        GrStencilAttachment* sb = fContext->resourceProvider()->attachStencilAttachment(rt);
-        if (sb) {
-            if (!fNVPRTextContext) {
-                fNVPRTextContext = GrStencilAndCoverTextContext::Create();
-            }
-
-            return fNVPRTextContext;
-        }
-    }
-
-    if (!fAtlasTextContext) {
-        fAtlasTextContext = GrAtlasTextContext::Create();
-    }
-
-    return fAtlasTextContext;
-}
-
 GrDrawTarget* GrDrawingManager::newDrawTarget(GrRenderTarget* rt) {
     SkASSERT(fContext);
 
@@ -196,6 +165,21 @@
         return nullptr;
     }
 
+
+    bool useDIF = false;
+    if (surfaceProps) {
+        useDIF = surfaceProps->isUseDeviceIndependentFonts();
+    }
+
+    if (useDIF && fContext->caps()->shaderCaps()->pathRenderingSupport() &&
+        rt->isStencilBufferMultisampled()) {
+        GrStencilAttachment* sb = fContext->resourceProvider()->attachStencilAttachment(rt);
+        if (sb) {
+            return new GrPathRenderingDrawContext(fContext, this, rt, surfaceProps,
+                                                  fContext->getAuditTrail(), fSingleOwner);
+        }
+    }
+
     return new GrDrawContext(fContext, this, rt, surfaceProps, fContext->getAuditTrail(),
                              fSingleOwner);
 }
diff --git a/src/gpu/GrDrawingManager.h b/src/gpu/GrDrawingManager.h
index a6d0104..d82a3a2 100644
--- a/src/gpu/GrDrawingManager.h
+++ b/src/gpu/GrDrawingManager.h
@@ -38,8 +38,6 @@
 
     GrDrawContext* drawContext(GrRenderTarget* rt, const SkSurfaceProps*);
 
-    GrTextContext* textContext(const SkSurfaceProps& props, GrRenderTarget* rt);
-
     // The caller automatically gets a ref on the returned drawTarget. It must 
     // be balanced by an unref call.
     GrDrawTarget* newDrawTarget(GrRenderTarget* rt);
@@ -60,8 +58,6 @@
         , fOptionsForDrawTargets(optionsForDrawTargets)
         , fSingleOwner(singleOwner)
         , fAbandoned(false)
-        , fNVPRTextContext(nullptr)
-        , fAtlasTextContext(nullptr)
         , fPathRendererChain(nullptr)
         , fSoftwarePathRenderer(nullptr)
         , fFlushState(context->getGpu(), context->resourceProvider())
@@ -87,9 +83,6 @@
     bool                        fAbandoned;
     SkTDArray<GrDrawTarget*>    fDrawTargets;
 
-    GrTextContext*              fNVPRTextContext;
-    GrTextContext*              fAtlasTextContext;
-
     GrPathRendererChain*        fPathRendererChain;
     GrSoftwarePathRenderer*     fSoftwarePathRenderer;
 
diff --git a/src/gpu/GrPathRenderingDrawContext.cpp b/src/gpu/GrPathRenderingDrawContext.cpp
new file mode 100644
index 0000000..a29af84
--- /dev/null
+++ b/src/gpu/GrPathRenderingDrawContext.cpp
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#include "GrPathRenderingDrawContext.h"
+
+#include "GrDrawingManager.h"
+
+#include "text/GrStencilAndCoverTextContext.h"
+
+#define ASSERT_SINGLE_OWNER \
+    SkDEBUGCODE(GrSingleOwner::AutoEnforce debug_SingleOwner(this->singleOwner());)
+#define RETURN_IF_ABANDONED        if (this->drawingManager()->abandoned()) { return; }
+
+void GrPathRenderingDrawContext::drawText(const GrClip& clip,  const GrPaint& grPaint,
+                                          const SkPaint& skPaint,
+                                          const SkMatrix& viewMatrix, const char text[],
+                                          size_t byteLength, SkScalar x, SkScalar y,
+                                          const SkIRect& clipBounds) {
+    ASSERT_SINGLE_OWNER
+    RETURN_IF_ABANDONED
+    SkDEBUGCODE(this->validate();)
+    GR_AUDIT_TRAIL_AUTO_FRAME(this->auditTrail(), "GrPathRenderingDrawContext::drawText");
+
+    if (!fStencilAndCoverTextContext) {
+        fStencilAndCoverTextContext = GrStencilAndCoverTextContext::Create();
+    }
+
+    fStencilAndCoverTextContext->drawText(this->drawingManager()->getContext(), this, clip, grPaint,
+                                          skPaint, viewMatrix, this->surfaceProps(),
+                                          text, byteLength, x, y, clipBounds);
+}
+
+void GrPathRenderingDrawContext::drawPosText(const GrClip& clip, const GrPaint& grPaint,
+                                             const SkPaint& skPaint,
+                                             const SkMatrix& viewMatrix, const char text[],
+                                             size_t byteLength,  const SkScalar pos[],
+                                             int scalarsPerPosition, const SkPoint& offset,
+                                             const SkIRect& clipBounds) {
+    ASSERT_SINGLE_OWNER
+    RETURN_IF_ABANDONED
+    SkDEBUGCODE(this->validate();)
+    GR_AUDIT_TRAIL_AUTO_FRAME(this->auditTrail(), "GrPathRenderingDrawContext::drawPosText");
+
+    if (!fStencilAndCoverTextContext) {
+        fStencilAndCoverTextContext = GrStencilAndCoverTextContext::Create();
+    }
+
+    fStencilAndCoverTextContext->drawPosText(this->drawingManager()->getContext(), this, clip,
+                                             grPaint, skPaint, viewMatrix, this->surfaceProps(),
+                                             text, byteLength, pos, scalarsPerPosition, offset,
+                                             clipBounds);
+}
+
+void GrPathRenderingDrawContext::drawTextBlob(const GrClip& clip, const SkPaint& skPaint,
+                                              const SkMatrix& viewMatrix, const SkTextBlob* blob,
+                                              SkScalar x, SkScalar y,
+                                              SkDrawFilter* filter, const SkIRect& clipBounds) {
+    ASSERT_SINGLE_OWNER
+    RETURN_IF_ABANDONED
+    SkDEBUGCODE(this->validate();)
+    GR_AUDIT_TRAIL_AUTO_FRAME(this->auditTrail(), "GrPathRenderingDrawContext::drawTextBlob");
+
+    if (!fStencilAndCoverTextContext) {
+        fStencilAndCoverTextContext = GrStencilAndCoverTextContext::Create();
+    }
+
+    fStencilAndCoverTextContext->drawTextBlob(this->drawingManager()->getContext(), this, clip,
+                                              skPaint, viewMatrix, this->surfaceProps(), blob, x,
+                                              y, filter, clipBounds);
+}
diff --git a/src/gpu/GrPathRenderingDrawContext.h b/src/gpu/GrPathRenderingDrawContext.h
new file mode 100644
index 0000000..ab36955
--- /dev/null
+++ b/src/gpu/GrPathRenderingDrawContext.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2016 Google Inc.
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef GrPathRenderingDrawContext_DEFINED
+#define GrPathRenderingDrawContext_DEFINED
+
+#include "GrDrawContext.h"
+
+class GrStencilAndCoverTextContext;
+
+class GrPathRenderingDrawContext : public GrDrawContext {
+public:
+    void drawText(const GrClip&,  const GrPaint&, const SkPaint&,
+                  const SkMatrix& viewMatrix, const char text[], size_t byteLength,
+                  SkScalar x, SkScalar y, const SkIRect& clipBounds) override;
+    void drawPosText(const GrClip&, const GrPaint&, const SkPaint&,
+                     const SkMatrix& viewMatrix, const char text[], size_t byteLength,
+                     const SkScalar pos[], int scalarsPerPosition,
+                     const SkPoint& offset, const SkIRect& clipBounds) override;
+    void drawTextBlob(const GrClip&, const SkPaint&,
+                      const SkMatrix& viewMatrix, const SkTextBlob*,
+                      SkScalar x, SkScalar y,
+                      SkDrawFilter*, const SkIRect& clipBounds) override;
+protected:
+    GrPathRenderingDrawContext(GrContext* ctx, GrDrawingManager* mgr, GrRenderTarget* rt,
+                               const SkSurfaceProps* surfaceProps, GrAuditTrail* at,
+                               GrSingleOwner* so)
+        : INHERITED(ctx, mgr, rt, surfaceProps, at, so)
+        , fStencilAndCoverTextContext(nullptr) {}
+
+private:
+    GrStencilAndCoverTextContext* fStencilAndCoverTextContext;
+
+    friend class GrDrawingManager; // for ctor
+
+    typedef GrDrawContext INHERITED;
+};
+
+#endif
