BitmapTextBatch and BitmapTextBlob

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/eed1dae04932483579b02c10f0706127d3f5d984

Review URL: https://codereview.chromium.org/1011403004
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 4c7f3ea..a1f1c25 100755
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -10,7 +10,9 @@
 
 #include "GrAARectRenderer.h"
 #include "GrBatch.h"
+#include "GrBatchFontCache.h"
 #include "GrBatchTarget.h"
+#include "GrBitmapTextContext.h"
 #include "GrBufferAllocPool.h"
 #include "GrDefaultGeoProcFactory.h"
 #include "GrFontCache.h"
@@ -94,6 +96,7 @@
     fPathRendererChain = NULL;
     fSoftwarePathRenderer = NULL;
     fResourceCache = NULL;
+    fBatchFontCache = NULL;
     fFontCache = NULL;
     fDrawBuffer = NULL;
     fDrawBufferVBAllocPool = NULL;
@@ -129,6 +132,10 @@
     fDidTestPMConversions = false;
 
     this->setupDrawBuffer();
+
+    // GrBatchFontCache will eventually replace GrFontCache
+    fBatchFontCache = SkNEW(GrBatchFontCache);
+    fBatchFontCache->init(this);
 }
 
 GrContext::~GrContext() {
@@ -143,6 +150,7 @@
     }
 
     SkDELETE(fResourceCache);
+    SkDELETE(fBatchFontCache);
     SkDELETE(fFontCache);
     SkDELETE(fDrawBuffer);
     SkDELETE(fDrawBufferVBAllocPool);
@@ -180,6 +188,7 @@
     fAARectRenderer->reset();
     fOvalRenderer->reset();
 
+    fBatchFontCache->freeAll();
     fFontCache->freeAll();
     fLayerCache->freeAll();
 }
@@ -198,6 +207,7 @@
     fAARectRenderer->reset();
     fOvalRenderer->reset();
 
+    fBatchFontCache->freeAll();
     fFontCache->freeAll();
     fLayerCache->freeAll();
     // a path renderer may be holding onto resources
@@ -226,8 +236,12 @@
         }
     } 
 
+#ifdef USE_BITMAP_TEXTBLOBS
+    return GrBitmapTextContextB::Create(this, gpuDevice, leakyProperties);
+#else
     return GrDistanceFieldTextContext::Create(this, gpuDevice, leakyProperties,
                                               enableDistanceFieldFonts);
+#endif
 }
 
 ////////////////////////////////////////////////////////////////////////////////