From 6bd41969a0f2283a7a7320bb0025551353c241ec Mon Sep 17 00:00:00 2001 From: mtklein Date: Thu, 2 Oct 2014 07:41:56 -0700 Subject: BBHs: void* data -> unsigned data Now that the old backend's not using BBHs, we can specialize them for SkRecord's needs. The only thing we really want to store is op index, which should always be small enough to fit into an unsigned (unsigned also helps keep it straight from other ints floating around). This means we'll need half (32-bit) or a quarter (64-bit) the bytes in SkTileGrid, because we don't have to store an extra int for ordering. BUG=skia:2834 Review URL: https://codereview.chromium.org/617393004 --- bench/RTreeBench.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'bench/RTreeBench.cpp') diff --git a/bench/RTreeBench.cpp b/bench/RTreeBench.cpp index 5442f7e261..21c1d79a94 100644 --- a/bench/RTreeBench.cpp +++ b/bench/RTreeBench.cpp @@ -51,8 +51,7 @@ protected: SkRandom rand; for (int i = 0; i < loops; ++i) { for (int j = 0; j < NUM_BUILD_RECTS; ++j) { - fTree->insert(reinterpret_cast(j), fProc(rand, j, NUM_BUILD_RECTS), - fBulkLoad); + fTree->insert(j, fProc(rand, j, NUM_BUILD_RECTS), fBulkLoad); } fTree->flushDeferredInserts(); fTree->clear(); @@ -104,9 +103,7 @@ protected: virtual void onPreDraw() SK_OVERRIDE { SkRandom rand; for (int j = 0; j < NUM_QUERY_RECTS; ++j) { - fTree->insert(reinterpret_cast(j), - fProc(rand, j, NUM_QUERY_RECTS), - fBulkLoad); + fTree->insert(j, fProc(rand, j, NUM_QUERY_RECTS), fBulkLoad); } fTree->flushDeferredInserts(); } @@ -114,7 +111,7 @@ protected: virtual void onDraw(const int loops, SkCanvas* canvas) SK_OVERRIDE { SkRandom rand; for (int i = 0; i < loops; ++i) { - SkTDArray hits; + SkTDArray hits; SkRect query; switch(fQuery) { case kSmall_QueryType: -- cgit v1.2.3