Simplify SkBBH::insert API
No one's exploiting the ability to take ownership of the array anymore.
BUG=skia:
Review URL: https://codereview.chromium.org/913833002
diff --git a/tests/PictureTest.cpp b/tests/PictureTest.cpp
index 18af979..33e058c 100644
--- a/tests/PictureTest.cpp
+++ b/tests/PictureTest.cpp
@@ -1255,7 +1255,7 @@
this->searchCalls++;
}
- void insert(SkAutoTMalloc<SkRect>*, int) SK_OVERRIDE {}
+ void insert(const SkRect[], int) SK_OVERRIDE {}
virtual size_t bytesUsed() const SK_OVERRIDE { return 0; }
};
diff --git a/tests/RTreeTest.cpp b/tests/RTreeTest.cpp
index 50eaacb..16ccb4f 100644
--- a/tests/RTreeTest.cpp
+++ b/tests/RTreeTest.cpp
@@ -80,7 +80,7 @@
rects[j] = random_rect(rand);
}
- rtree.insert(&rects, NUM_RECTS);
+ rtree.insert(rects.get(), NUM_RECTS);
SkASSERT(rects); // SkRTree doesn't take ownership of rects.
run_queries(reporter, rand, rects, rtree);
diff --git a/tests/RecordDrawTest.cpp b/tests/RecordDrawTest.cpp
index 4e1ad15..cf138b8 100644
--- a/tests/RecordDrawTest.cpp
+++ b/tests/RecordDrawTest.cpp
@@ -123,10 +123,10 @@
}
struct TestBBH : public SkBBoxHierarchy {
- void insert(SkAutoTMalloc<SkRect>* boundsArray, int N) SK_OVERRIDE {
+ void insert(const SkRect boundsArray[], int N) SK_OVERRIDE {
fEntries.setCount(N);
for (int i = 0; i < N; i++) {
- Entry e = { (unsigned)i, (*boundsArray)[i] };
+ Entry e = { (unsigned)i, boundsArray[i] };
fEntries[i] = e;
}
}