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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 175543002: CC: Fix overlow in multiply. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mimimal patch for cherry-pick. Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index d79b0855044a71f1bb1ff867bd0dd447e4d699d0..6a1c2fa411ed75daa06df20ae6b7c00e7aa9fbd3 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1174,8 +1174,9 @@ void LayerTreeHostImpl::UpdateTileManagerMemoryPolicy(
global_tile_state_.hard_memory_limit_in_bytes =
policy.bytes_limit_when_visible;
global_tile_state_.soft_memory_limit_in_bytes =
- global_tile_state_.hard_memory_limit_in_bytes *
- settings_.max_memory_for_prepaint_percentage / 100;
+ (static_cast<int64>(global_tile_state_.hard_memory_limit_in_bytes) *
+ settings_.max_memory_for_prepaint_percentage) /
+ 100;
}
// Unused limit is calculated from soft-limit, as hard-limit may
// be very high and shouldn't typically be exceeded.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698