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

Unified Diff: cc/trees/occlusion_tracker.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_impl.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/occlusion_tracker.cc
diff --git a/cc/trees/occlusion_tracker.cc b/cc/trees/occlusion_tracker.cc
index 0f0ce158400add99977bb525b0a1b334d0f782a9..d11a81328de12e96069a77639361f5fa75bbf545 100644
--- a/cc/trees/occlusion_tracker.cc
+++ b/cc/trees/occlusion_tracker.cc
@@ -213,7 +213,7 @@ void OcclusionTracker<LayerType>::EnterRenderTarget(
if (!copy_outside_occlusion_forward)
return;
- int last_index = stack_.size() - 1;
+ size_t last_index = stack_.size() - 1;
gfx::Transform old_target_to_new_target_transform(
inverse_new_target_screen_space_transform,
old_target->render_surface()->screen_space_transform());
@@ -318,7 +318,8 @@ static void ReduceOcclusionBelowSurface(
template <typename LayerType>
void OcclusionTracker<LayerType>::LeaveToRenderTarget(
const LayerType* new_target) {
- int last_index = stack_.size() - 1;
+ DCHECK(!stack_.empty());
+ size_t last_index = stack_.size() - 1;
bool surface_will_be_at_top_after_pop =
stack_.size() > 1 && stack_[last_index - 1].target == new_target;
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698