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

Unified Diff: cc/resources/picture_layer_tiling_set.cc

Issue 13206004: cc: Fix build issues for adding ‘chromium_code’: 1 to cc.gyp and cc_tests.gyp (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/resources/content_layer_updater.cc ('k') | cc/resources/picture_pile.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/picture_layer_tiling_set.cc
diff --git a/cc/resources/picture_layer_tiling_set.cc b/cc/resources/picture_layer_tiling_set.cc
index f3c73c2d04f9b3e56c0139b6953f1f64495ac182..b5460b9dddf419538f44a387ab63b30a0a7d06a6 100644
--- a/cc/resources/picture_layer_tiling_set.cc
+++ b/cc/resources/picture_layer_tiling_set.cc
@@ -4,6 +4,8 @@
#include "cc/resources/picture_layer_tiling_set.h"
+#include <limits>
+
namespace cc {
namespace {
@@ -133,7 +135,11 @@ PictureLayerTilingSet::CoverageIterator::CoverageIterator(
}
}
- if (ideal_tiling_ == set_->tilings_.size() && ideal_tiling_ > 0)
+ DCHECK_LE(set_->tilings_.size(),
+ static_cast<size_t>(std::numeric_limits<int>::max()));
+
+ int num_tilings = set_->tilings_.size();
+ if (ideal_tiling_ == num_tilings && ideal_tiling_ > 0)
ideal_tiling_--;
++(*this);
« no previous file with comments | « cc/resources/content_layer_updater.cc ('k') | cc/resources/picture_pile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698