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

Unified Diff: cc/tiles/tile_priority.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/tiles/tile_manager.cc ('k') | cc/tiles/tiling_set_eviction_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/tile_priority.cc
diff --git a/cc/tiles/tile_priority.cc b/cc/tiles/tile_priority.cc
index cf9872e6dcd4931e887bdf87b19171afa396931d..0efe51e59728af49a4782b81f4d69aebafa829cb 100644
--- a/cc/tiles/tile_priority.cc
+++ b/cc/tiles/tile_priority.cc
@@ -4,6 +4,7 @@
#include "cc/tiles/tile_priority.h"
+#include "base/numerics/safe_conversions.h"
#include "base/trace_event/trace_event_argument.h"
#include "base/values.h"
#include "cc/base/math_util.h"
@@ -89,9 +90,12 @@ void GlobalStateThatImpactsTilePriority::AsValueInto(
base::trace_event::TracedValue* state) const {
state->SetString("memory_limit_policy",
TileMemoryLimitPolicyToString(memory_limit_policy));
- state->SetInteger("soft_memory_limit_in_bytes", soft_memory_limit_in_bytes);
- state->SetInteger("hard_memory_limit_in_bytes", hard_memory_limit_in_bytes);
- state->SetInteger("num_resources_limit", num_resources_limit);
+ state->SetInteger("soft_memory_limit_in_bytes",
+ base::saturated_cast<int>(soft_memory_limit_in_bytes));
+ state->SetInteger("hard_memory_limit_in_bytes",
+ base::saturated_cast<int>(hard_memory_limit_in_bytes));
+ state->SetInteger("num_resources_limit",
+ base::saturated_cast<int>(num_resources_limit));
state->SetString("tree_priority", TreePriorityToString(tree_priority));
}
« no previous file with comments | « cc/tiles/tile_manager.cc ('k') | cc/tiles/tiling_set_eviction_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698