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

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
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..9e2da801b00bdfe7254bb39ef4f1dc08d82c9050 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -1361,9 +1361,10 @@ 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);
+ for (size_t i = 0; i < layer->children().size(); ++i) {
danakj 2015/06/09 17:39:49 we could cache the size() for each of these and th
vmpstr 2015/06/09 18:37:17 Done.
+ size_t index = layer->children().size() - 1 - i;
+ FindClosestMatchingLayer(screen_space_point, layer->children()[index], func,
+ data_for_recursion);
}
float distance_to_intersection = 0.f;

Powered by Google App Engine
This is Rietveld 408576698