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

Unified Diff: cc/trees/property_tree.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/occlusion_tracker.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/property_tree.cc
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc
index e155ee7f35a1135d0adb3e70e7d029549ebdd272..e85eadbcbaaa33b401e4c3e16fbe24c5770f85c9 100644
--- a/cc/trees/property_tree.cc
+++ b/cc/trees/property_tree.cc
@@ -239,8 +239,10 @@ bool TransformTree::CombineTransformsBetween(int source_id,
SkDoubleToMScalar(1e-4)));
}
- for (int i = source_to_destination.size() - 1; i >= 0; i--) {
- const TransformNode* node = Node(source_to_destination[i]);
+ size_t source_to_destination_size = source_to_destination.size();
+ for (size_t i = 0; i < source_to_destination_size; ++i) {
+ size_t index = source_to_destination_size - 1 - i;
+ const TransformNode* node = Node(source_to_destination[index]);
if (node->data.flattens_inherited_transform)
combined_transform.FlattenTo2d();
combined_transform.PreconcatTransform(node->data.to_parent);
« no previous file with comments | « cc/trees/occlusion_tracker.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698