diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index cca476b..712eff6 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -836,7 +836,7 @@
     GrGpu* getGpu() { return fGpu; }
     const GrGpu* getGpu() const { return fGpu; }
     GrFontCache* getFontCache() { return fFontCache; }
-    GrDrawTarget* getTextTarget(const GrPaint& paint);
+    GrDrawTarget* getTextTarget();
     const GrIndexBuffer* getQuadIndexBuffer() const;
 
     /**
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index acae5b2..a28f1bc 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1654,8 +1654,8 @@
     fDrawBuffer->setDrawState(fDrawState);
 }
 
-GrDrawTarget* GrContext::getTextTarget(const GrPaint& paint) {
-    return this->prepareToDraw(&paint, BUFFERED_DRAW);
+GrDrawTarget* GrContext::getTextTarget() {
+    return this->prepareToDraw(NULL, BUFFERED_DRAW);
 }
 
 const GrIndexBuffer* GrContext::getQuadIndexBuffer() const {
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index f114ccc..2a81e26 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -64,6 +64,9 @@
     fCommon.fStencilSettings.setDisabled();
     this->resetStateFlags();
 
+    // Enable the clip bit
+    this->enableState(GrDrawState::kClip_StateBit);
+
     this->setColor(paint.getColor());
     this->setState(GrDrawState::kDither_StateBit, paint.isDither());
     this->setState(GrDrawState::kHWAntialias_StateBit, paint.isAntiAlias());
diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h
index 90c35f1..5b1194d 100644
--- a/src/gpu/GrDrawState.h
+++ b/src/gpu/GrDrawState.h
@@ -94,7 +94,7 @@
      * Initializes the GrDrawState based on a GrPaint, view matrix and render target. Note that
      * GrDrawState encompasses more than GrPaint. Aspects of GrDrawState that have no GrPaint
      * equivalents are set to default values. GrPaint has fewer stages than GrDrawState. The extra
-     * GrDrawState stages are disabled.
+     * GrDrawState stages are disabled. Clipping will be enabled.
      */
     void setFromPaint(const GrPaint& , const SkMatrix& viewMatrix, GrRenderTarget*);
 
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index 804165b..19f18b5 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -27,7 +27,10 @@
     if (NULL == fDrawTarget) {
         return;
     }
+    GrDrawTarget::AutoStateRestore asr(fDrawTarget, GrDrawTarget::kPreserve_ASRInit);
     GrDrawState* drawState = fDrawTarget->drawState();
+    drawState->setFromPaint(fPaint, SkMatrix::I(), fContext->getRenderTarget());
+
     if (fCurrVertex > 0) {
         // setup our sampler state for our text texture/atlas
         GrAssert(GrIsALIGN4(fCurrVertex));
@@ -68,8 +71,6 @@
         fCurrVertex = 0;
         GrSafeSetNull(fCurrTexture);
     }
-    drawState->disableStages();
-    fDrawTarget = NULL;
 }
 
 GrTextContext::GrTextContext(GrContext* context, const GrPaint& paint) : fPaint(paint) {
@@ -93,7 +94,7 @@
 
     fAutoMatrix.setIdentity(fContext, &fPaint);
 
-    fDrawTarget = NULL;
+    fDrawTarget = fContext->getTextTarget();
 
     fVertices = NULL;
     fMaxVertices = 0;
@@ -101,9 +102,6 @@
 
 GrTextContext::~GrTextContext() {
     this->flushGlyphs();
-    if (fDrawTarget) {
-        fDrawTarget->drawState()->disableStages();
-    }
 }
 
 void GrTextContext::flush() {
@@ -123,6 +121,9 @@
 void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
                                     GrFixed vx, GrFixed vy,
                                     GrFontScaler* scaler) {
+    if (NULL == fDrawTarget) {
+        return;
+    }
     if (NULL == fStrike) {
         fStrike = fContext->getFontCache()->getStrike(scaler);
     }
@@ -205,18 +206,14 @@
        // If we need to reserve vertices allow the draw target to suggest
         // a number of verts to reserve and whether to perform a flush.
         fMaxVertices = kMinRequestedVerts;
-        bool flush = false;
-        fDrawTarget = fContext->getTextTarget(fPaint);
-        if (NULL != fDrawTarget) {
-            fDrawTarget->drawState()->setVertexAttribs<gTextVertexAttribs>(SK_ARRAY_COUNT(gTextVertexAttribs));
-            flush = fDrawTarget->geometryHints(&fMaxVertices, NULL);
-        }
+        fDrawTarget->drawState()->setVertexAttribs<gTextVertexAttribs>(
+            SK_ARRAY_COUNT(gTextVertexAttribs));
+        bool flush = fDrawTarget->geometryHints(&fMaxVertices, NULL);
         if (flush) {
             this->flushGlyphs();
             fContext->flush();
-            // flushGlyphs() will reset fDrawTarget to NULL.
-            fDrawTarget = fContext->getTextTarget(fPaint);
-            fDrawTarget->drawState()->setVertexAttribs<gTextVertexAttribs>(SK_ARRAY_COUNT(gTextVertexAttribs));
+            fDrawTarget->drawState()->setVertexAttribs<gTextVertexAttribs>(
+                SK_ARRAY_COUNT(gTextVertexAttribs));
         }
         fMaxVertices = kDefaultRequestedVerts;
         // ignore return, no point in flushing again.
@@ -229,11 +226,10 @@
             // don't exceed the limit of the index buffer
             fMaxVertices = maxQuadVertices;
         }
-        bool success = fDrawTarget->reserveVertexAndIndexSpace(
-                                                   fMaxVertices,
-                                                   0,
-                                                   GrTCast<void**>(&fVertices),
-                                                   NULL);
+        bool success = fDrawTarget->reserveVertexAndIndexSpace(fMaxVertices,
+                                                               0,
+                                                               GrTCast<void**>(&fVertices),
+                                                               NULL);
         GrAlwaysAssert(success);
         GrAssert(2*sizeof(GrPoint) == fDrawTarget->getDrawState().getVertexSize());
     }
