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

Unified Diff: cc/paint/discardable_image_map.cc

Issue 2881063003: cc: Change RTree::Search to return results, add comments, more tests. (Closed)
Patch Set: update 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
« no previous file with comments | « cc/base/rtree_unittest.cc ('k') | cc/paint/discardable_image_map_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..2a2f0fc1734a937199ae284e82e27bd05be37cdc 100644
--- a/cc/paint/discardable_image_map.cc
+++ b/cc/paint/discardable_image_map.cc
@@ -37,9 +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);
- for (size_t index : indices) {
+ for (size_t index : images_rtree_.Search(rect)) {
images->push_back(all_images_[index]
.first.ApplyScale(contents_scale)
.ApplyTargetColorSpace(target_color_space));
« no previous file with comments | « cc/base/rtree_unittest.cc ('k') | cc/paint/discardable_image_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698