diff options
author | mtklein <mtklein@chromium.org> | 2014-08-26 14:07:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-26 14:07:04 -0700 |
commit | 2a65a238b0e688356aee09d08f3f8a317359b4d2 (patch) | |
tree | 4ba271569b87c2e01d6e5451d8074c433f8d1d99 /tools | |
parent | 8a914a76501d0bb4c60f8dbd1ae39c864688695b (diff) |
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
Diffstat (limited to 'tools')
-rw-r--r-- | tools/PictureRenderer.cpp | 14 | ||||
-rw-r--r-- | tools/PictureRenderer.h | 23 | ||||
-rw-r--r-- | tools/PictureRenderingFlags.cpp | 4 | ||||
-rw-r--r-- | tools/bbh_shootout.cpp | 3 | ||||
-rw-r--r-- | tools/bench_record.cpp | 7 |
5 files changed, 19 insertions, 32 deletions
diff --git a/tools/PictureRenderer.cpp b/tools/PictureRenderer.cpp index ac639e59e8..72c72a5536 100644 --- a/tools/PictureRenderer.cpp +++ b/tools/PictureRenderer.cpp @@ -48,10 +48,10 @@ enum { 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 @@ SkString SimplePictureRenderer::getConfigNameInternal() { #if SK_SUPPORT_GPU TiledPictureRenderer::TiledPictureRenderer(const GrContext::Options& opts) - : INHERITED(opts) + : INHERITED(opts) , fTileWidth(kDefaultTileWidth) #else TiledPictureRenderer::TiledPictureRenderer() @@ -588,8 +588,8 @@ void TiledPictureRenderer::setupPowerOf2Tiles() { * 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 @@ SkBBHFactory* PictureRenderer::getFactory() { 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 f11b198cf3..04ac20fcb6 100644 --- a/tools/PictureRenderer.h +++ b/tools/PictureRenderer.h @@ -56,7 +56,6 @@ public: enum BBoxHierarchyType { kNone_BBoxHierarchyType = 0, - kQuadTree_BBoxHierarchyType, kRTree_BBoxHierarchyType, kTileGrid_BBoxHierarchyType, @@ -90,10 +89,10 @@ public: * @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 @@ public: } 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 @@ public: } 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 @@ public: const SkPicture* getPicture() { return fPicture; } - + #if SK_SUPPORT_GPU explicit PictureRenderer(const GrContext::Options &opts) #else @@ -550,9 +545,9 @@ public: #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 @@ public: 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 ee7b8efea2..d78229acce 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 @@ sk_tools::PictureRenderer* parseRenderer(SkString& error, PictureTool tool) { 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 27818de73a..2a827fd896 100644 --- a/tools/bbh_shootout.cpp +++ b/tools/bbh_shootout.cpp @@ -23,7 +23,7 @@ static const int kBBoxTypeCount = sk_tools::PictureRenderer::kLast_BBoxHierarchy 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 @@ struct Measurement { 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 d102250c19..df1f24cdc3 100644 --- a/tools/bench_record.cpp +++ b/tools/bench_record.cpp @@ -23,7 +23,7 @@ __SK_FORCE_IMAGE_DECODER_LINKING; 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 @@ static SkBBHFactory* parse_FLAGS_bbh() { 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; } |