Remove SkQuadTree.

We're not testing it to the same degree we do RTree and TileGrid.  Any changes
we'll make to BBH APIs become 33% easier without it.  If find we want it again,
we can always resurrect it.

BUG=skia:1021,skia:2834
R=robertphillips@google.com, mtklein@google.com
TBR=reed

Author: mtklein@chromium.org

Review URL: https://codereview.chromium.org/500373005
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp
index ac639e5..72c72a5 100644
--- a/tools/PictureRenderer.cpp
+++ b/tools/PictureRenderer.cpp
@@ -48,10 +48,10 @@
     kDefaultTileHeight = 256
 };
 
-void PictureRenderer::init(const SkPicture* pict, 
-                           const SkString* writePath, 
+void PictureRenderer::init(const SkPicture* pict,
+                           const SkString* writePath,
                            const SkString* mismatchPath,
-                           const SkString* inputFilename, 
+                           const SkString* inputFilename,
                            bool useChecksumBasedFilenames) {
     this->CopyString(&fWritePath, writePath);
     this->CopyString(&fMismatchPath, mismatchPath);
@@ -446,7 +446,7 @@
 
 #if SK_SUPPORT_GPU
 TiledPictureRenderer::TiledPictureRenderer(const GrContext::Options& opts)
-    : INHERITED(opts)        
+    : INHERITED(opts)
     , fTileWidth(kDefaultTileWidth)
 #else
 TiledPictureRenderer::TiledPictureRenderer()
@@ -588,8 +588,8 @@
  * Saves and restores so that the initial clip and matrix return to their state before this function
  * is called.
  */
-static void draw_tile_to_canvas(SkCanvas* canvas, 
-                                const SkRect& tileRect, 
+static void draw_tile_to_canvas(SkCanvas* canvas,
+                                const SkRect& tileRect,
                                 const SkPicture* picture) {
     int saveCount = canvas->save();
     // Translate so that we draw the correct portion of the picture.
@@ -736,8 +736,6 @@
     switch (fBBoxHierarchyType) {
         case kNone_BBoxHierarchyType:
             return NULL;
-        case kQuadTree_BBoxHierarchyType:
-            return SkNEW(SkQuadTreeFactory);
         case kRTree_BBoxHierarchyType:
             return SkNEW(SkRTreeFactory);
         case kTileGrid_BBoxHierarchyType:
diff --git a/tools/PictureRenderer.h b/tools/PictureRenderer.h
index f11b198..04ac20f 100644
--- a/tools/PictureRenderer.h
+++ b/tools/PictureRenderer.h
@@ -56,7 +56,6 @@
 
     enum BBoxHierarchyType {
         kNone_BBoxHierarchyType = 0,
-        kQuadTree_BBoxHierarchyType,
         kRTree_BBoxHierarchyType,
         kTileGrid_BBoxHierarchyType,
 
@@ -90,10 +89,10 @@
      * @param useChecksumBasedFilenames Whether to use checksum-based filenames when writing
      *     bitmap images to disk.
      */
-    virtual void init(const SkPicture* pict, 
-                      const SkString* writePath, 
+    virtual void init(const SkPicture* pict,
+                      const SkString* writePath,
                       const SkString* mismatchPath,
-                      const SkString* inputFilename, 
+                      const SkString* inputFilename,
                       bool useChecksumBasedFilenames);
 
     /**
@@ -261,8 +260,6 @@
         }
         if (kRTree_BBoxHierarchyType == fBBoxHierarchyType) {
             config.append("_rtree");
-        } else if (kQuadTree_BBoxHierarchyType == fBBoxHierarchyType) {
-            config.append("_quadtree");
         } else if (kTileGrid_BBoxHierarchyType == fBBoxHierarchyType) {
             config.append("_grid");
             config.append("_");
@@ -311,8 +308,6 @@
         }
         if (kRTree_BBoxHierarchyType == fBBoxHierarchyType) {
             result["bbh"] = "rtree";
-        } else if (kQuadTree_BBoxHierarchyType == fBBoxHierarchyType) {
-            result["bbh"] = "quadtree";
         } else if (kTileGrid_BBoxHierarchyType == fBBoxHierarchyType) {
             SkString tmp("grid_");
             tmp.appendS32(fGridInfo.fTileInterval.width());
@@ -416,7 +411,7 @@
     const SkPicture* getPicture() {
         return fPicture;
     }
-    
+
 #if SK_SUPPORT_GPU
     explicit PictureRenderer(const GrContext::Options &opts)
 #else
@@ -550,9 +545,9 @@
 #endif
 
     virtual void init(const SkPicture* pict,
-                      const SkString* writePath, 
+                      const SkString* writePath,
                       const SkString* mismatchPath,
-                      const SkString* inputFilename, 
+                      const SkString* inputFilename,
                       bool useChecksumBasedFilenames) SK_OVERRIDE;
 
     virtual bool render(SkBitmap** out = NULL) SK_OVERRIDE;
@@ -571,10 +566,10 @@
     TiledPictureRenderer();
 #endif
 
-    virtual void init(const SkPicture* pict, 
-                      const SkString* writePath, 
+    virtual void init(const SkPicture* pict,
+                      const SkString* writePath,
                       const SkString* mismatchPath,
-                      const SkString* inputFilename, 
+                      const SkString* inputFilename,
                       bool useChecksumBasedFilenames) SK_OVERRIDE;
 
     /**
diff --git a/tools/PictureRenderingFlags.cpp b/tools/PictureRenderingFlags.cpp
index ee7b8ef..d78229a 100644
--- a/tools/PictureRenderingFlags.cpp
+++ b/tools/PictureRenderingFlags.cpp
@@ -18,7 +18,7 @@
 
 // Alphabetized list of flags used by this file or bench_ and render_pictures.
 DEFINE_string(bbh, "none", "bbhType [width height]: Set the bounding box hierarchy type to "
-              "be used. Accepted values are: none, rtree, quadtree, grid. "
+              "be used. Accepted values are: none, rtree, grid. "
               "Not compatible with --pipe. With value "
               "'grid', width and height must be specified. 'grid' can "
               "only be used with modes tile, record, and "
@@ -346,8 +346,6 @@
         const char* type = FLAGS_bbh[0];
         if (0 == strcmp(type, "none")) {
             bbhType = sk_tools::PictureRenderer::kNone_BBoxHierarchyType;
-        } else if (0 == strcmp(type, "quadtree")) {
-            bbhType = sk_tools::PictureRenderer::kQuadTree_BBoxHierarchyType;
         } else if (0 == strcmp(type, "rtree")) {
             bbhType = sk_tools::PictureRenderer::kRTree_BBoxHierarchyType;
         } else if (0 == strcmp(type, "grid")) {
diff --git a/tools/bbh_shootout.cpp b/tools/bbh_shootout.cpp
index 27818de..2a827fd 100644
--- a/tools/bbh_shootout.cpp
+++ b/tools/bbh_shootout.cpp
@@ -23,7 +23,7 @@
 
 DEFINE_string2(skps, r, "", "The list of SKPs to benchmark.");
 DEFINE_string(bb_types, "", "The set of bbox types to test. If empty, all are tested. "
-                       "Should be one or more of none, quadtree, rtree, tilegrid.");
+                       "Should be one or more of none, rtree, tilegrid.");
 DEFINE_int32(record, 100, "Number of times to record each SKP.");
 DEFINE_int32(playback, 1, "Number of times to playback each SKP.");
 DEFINE_int32(tilesize, 256, "The size of a tile.");
@@ -36,7 +36,6 @@
 
 const char* kBBoxHierarchyTypeNames[kBBoxTypeCount] = {
     "none", // kNone_BBoxHierarchyType
-    "quadtree", // kQuadTree_BBoxHierarchyType
     "rtree", // kRTree_BBoxHierarchyType
     "tilegrid", // kTileGrid_BBoxHierarchyType
 };
diff --git a/tools/bench_record.cpp b/tools/bench_record.cpp
index d102250..df1f24c 100644
--- a/tools/bench_record.cpp
+++ b/tools/bench_record.cpp
@@ -23,7 +23,7 @@
 DEFINE_string2(skps, r, "skps", "Directory containing SKPs to read and re-record.");
 DEFINE_int32(samples, 10, "Number of times to re-record each SKP.");
 DEFINE_int32(tileGridSize, 512, "Set the tile grid size. Has no effect if bbh is not set to tilegrid.");
-DEFINE_string(bbh, "", "Turn on the bbh and select the type, one of rtree, tilegrid, quadtree");
+DEFINE_string(bbh, "", "Turn on the bbh and select the type, one of rtree, tilegrid");
 DEFINE_bool(skr, false, "Record SKR instead of SKP.");
 DEFINE_string(match, "", "The usual filters on file names of SKPs to bench.");
 DEFINE_string(timescale, "us", "Print times in ms, us, or ns");
@@ -54,10 +54,7 @@
         info.fOffset.setZero();
         return SkNEW_ARGS(SkTileGridFactory, (info));
     }
-    if (FLAGS_bbh.contains("quadtree")) {
-        return SkNEW(SkQuadTreeFactory);
-    }
-    SkDebugf("Invalid bbh type %s, must be one of rtree, tilegrid, quadtree.\n", FLAGS_bbh[0]);
+    SkDebugf("Invalid bbh type %s, must be one of rtree, tilegrid.\n", FLAGS_bbh[0]);
     return NULL;
 }