BitmapTextBatch and BitmapTextBlob

BUG=skia:

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

Review URL: https://codereview.chromium.org/1011403004
diff --git a/src/gpu/GrBatchAtlas.cpp b/src/gpu/GrBatchAtlas.cpp
index 566cd5d..3374e00 100644
--- a/src/gpu/GrBatchAtlas.cpp
+++ b/src/gpu/GrBatchAtlas.cpp
@@ -227,7 +227,8 @@
     , fNumPlotsX(numPlotsX)
     , fNumPlotsY(numPlotsY)
     , fPlotWidth(texture->width() / numPlotsX)
-    , fPlotHeight(texture->height() / numPlotsY) {
+    , fPlotHeight(texture->height() / numPlotsY)
+    , fAtlasGeneration(kInvalidAtlasGeneration + 1) {
     SkASSERT(fPlotWidth * fNumPlotsX == texture->width());
     SkASSERT(fPlotHeight * fNumPlotsY == texture->height());
 
@@ -243,7 +244,7 @@
         for (int x = fNumPlotsX - 1, c = 0; x >= 0; --x, ++c) {
             int id = r * fNumPlotsX + c;
             currPlot->reset(SkNEW(BatchPlot));
-            (*currPlot)->init(this, texture, id, 0, x, y, fPlotWidth, fPlotHeight, fBPP);
+            (*currPlot)->init(this, texture, id, 1, x, y, fPlotWidth, fPlotHeight, fBPP);
 
             // build LRU list
             fPlotList.addToHead(currPlot->get());
@@ -318,6 +319,7 @@
         SkDEBUGCODE(bool verify = )plot->addSubImage(width, height, image, loc, fBPP * width);
         SkASSERT(verify);
         this->updatePlot(batchTarget, id, plot);
+        fAtlasGeneration++;
         return true;
     }
 
@@ -352,6 +354,7 @@
     batchTarget->upload(uploader);
     *id = newPlot->id();
     plot->unref();
+    fAtlasGeneration++;
     return true;
 }