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

Unified Diff: cc/layers/layer_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/layers/layer_impl.cc
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index e6d9700043053afc091ed205e80e11e5d5eb047d..0564484597ab0dfccffa3188a64c2fe6b6a98e30 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -78,7 +78,7 @@ LayerImpl::LayerImpl(LayerTreeImpl* tree_impl,
clip_tree_index_(-1),
draw_depth_(0.f),
needs_push_properties_(false),
- num_dependents_need_push_properties_(0),
+ num_dependents_need_push_properties_(0u),
sorting_context_id_(0),
current_draw_mode_(DRAW_MODE_NONE),
frame_timing_requests_dirty_(false),
@@ -1480,8 +1480,6 @@ void LayerImpl::SetNeedsPushProperties() {
}
void LayerImpl::AddDependentNeedsPushProperties() {
- DCHECK_GE(num_dependents_need_push_properties_, 0);
-
if (!parent_should_know_need_push_properties() && parent_)
parent_->AddDependentNeedsPushProperties();
@@ -1489,8 +1487,8 @@ void LayerImpl::AddDependentNeedsPushProperties() {
}
void LayerImpl::RemoveDependentNeedsPushProperties() {
+ DCHECK_GT(num_dependents_need_push_properties_, 0u);
num_dependents_need_push_properties_--;
- DCHECK_GE(num_dependents_need_push_properties_, 0);
if (!parent_should_know_need_push_properties() && parent_)
parent_->RemoveDependentNeedsPushProperties();

Powered by Google App Engine
This is Rietveld 408576698