Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2329)

Unified Diff: cc/paint/discardable_image_map.cc

Issue 2881063003: cc: Change RTree::Search to return results, add comments, more tests. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/paint/discardable_image_map.cc
diff --git a/cc/paint/discardable_image_map.cc b/cc/paint/discardable_image_map.cc
index fa45b242aa00ada2784471df82286d4d3cfc288a..f4adf81f3a7e279f4065d28aefa16d13a88e50f3 100644
--- a/cc/paint/discardable_image_map.cc
+++ b/cc/paint/discardable_image_map.cc
@@ -37,8 +37,7 @@ void DiscardableImageMap::GetDiscardableImagesInRect(
float contents_scale,
const gfx::ColorSpace& target_color_space,
std::vector<DrawImage>* images) const {
- std::vector<size_t> indices;
- images_rtree_.Search(rect, &indices);
+ std::vector<size_t> indices = images_rtree_.Search(rect);
for (size_t index : indices) {
danakj 2017/05/15 20:35:34 you could for (.. : Search()) directly if you want
vmpstr 2017/05/15 20:46:33 Done.
images->push_back(all_images_[index]
.first.ApplyScale(contents_scale)

Powered by Google App Engine
This is Rietveld 408576698