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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 1168903003: cc: Fix size_t to int truncations in tiles/ and trees/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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/trees/layer_tree_host_impl.cc ('k') | cc/trees/occlusion_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index c44eecc1113d7bcae48a11c154f10ca2c8039ac0..3e7821aa7c3d1958e48bfa20037205afcf64908f 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1361,9 +1361,11 @@ static void FindClosestMatchingLayer(
LayerImpl* layer,
const Functor& func,
FindClosestMatchingLayerDataForRecursion* data_for_recursion) {
- for (int i = layer->children().size() - 1; i >= 0; --i) {
- FindClosestMatchingLayer(
- screen_space_point, layer->children()[i], func, data_for_recursion);
+ size_t children_size = layer->children().size();
+ for (size_t i = 0; i < children_size; ++i) {
+ size_t index = children_size - 1 - i;
+ FindClosestMatchingLayer(screen_space_point, layer->children()[index], func,
+ data_for_recursion);
}
float distance_to_intersection = 0.f;
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/occlusion_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698