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

Unified Diff: cc/layers/layer.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.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index af3fc67471c847f0d6fbaf5dadc00d0838b983e5..760728cfad692adca38f889c2b2911f6e81a353d 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -40,7 +40,7 @@ scoped_refptr<Layer> Layer::Create(const LayerSettings& settings) {
Layer::Layer(const LayerSettings& settings)
: needs_push_properties_(false),
- num_dependents_need_push_properties_(false),
+ num_dependents_need_push_properties_(0u),
stacking_order_changed_(false),
// Layer IDs start from 1.
layer_id_(g_next_layer_id.GetNext() + 1),
@@ -209,8 +209,6 @@ void Layer::SetNeedsPushProperties() {
}
void Layer::AddDependentNeedsPushProperties() {
- DCHECK_GE(num_dependents_need_push_properties_, 0);
-
if (!parent_should_know_need_push_properties() && parent_)
parent_->AddDependentNeedsPushProperties();
@@ -218,8 +216,8 @@ void Layer::AddDependentNeedsPushProperties() {
}
void Layer::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