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

Unified Diff: cc/tiles/picture_layer_tiling.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/test/tiled_layer_test_common.cc ('k') | cc/tiles/picture_layer_tiling_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/picture_layer_tiling.cc
diff --git a/cc/tiles/picture_layer_tiling.cc b/cc/tiles/picture_layer_tiling.cc
index 3c22a4fc47cc53afa6fd765b453205b5e08ad0db..a500e804b05d19f861c1e37e51d97625c181d2e8 100644
--- a/cc/tiles/picture_layer_tiling.cc
+++ b/cc/tiles/picture_layer_tiling.cc
@@ -12,6 +12,7 @@
#include "base/containers/hash_tables.h"
#include "base/containers/small_map.h"
#include "base/logging.h"
+#include "base/numerics/safe_conversions.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/trace_event_argument.h"
#include "cc/base/math_util.h"
@@ -940,7 +941,7 @@ void PictureLayerTiling::GetAllPrioritizedTilesForTracing(
void PictureLayerTiling::AsValueInto(
base::trace_event::TracedValue* state) const {
- state->SetInteger("num_tiles", tiles_.size());
+ state->SetInteger("num_tiles", base::saturated_cast<int>(tiles_.size()));
state->SetDouble("content_scale", contents_scale_);
MathUtil::AddToTracedValue("visible_rect", current_visible_rect_, state);
MathUtil::AddToTracedValue("skewport_rect", current_skewport_rect_, state);
« no previous file with comments | « cc/test/tiled_layer_test_common.cc ('k') | cc/tiles/picture_layer_tiling_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698