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

Unified Diff: cc/playback/display_item_list.cc

Issue 1158433010: Reland: cc: Fix size_t to int truncations in layers/ output/ playback/ quads/ (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/playback/display_item_list.cc
diff --git a/cc/playback/display_item_list.cc b/cc/playback/display_item_list.cc
index 5ee754ba7605a8b96bd9dd72f266a7b05940ea72..e389836898866a817b4e148cab3d930e83a43aa2 100644
--- a/cc/playback/display_item_list.cc
+++ b/cc/playback/display_item_list.cc
@@ -6,6 +6,7 @@
#include <string>
+#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"
@@ -204,7 +205,7 @@ DisplayItemList::AsValue() const {
scoped_refptr<base::trace_event::TracedValue> state =
new base::trace_event::TracedValue();
- state->SetInteger("length", items_.size());
+ state->SetInteger("length", base::saturated_cast<int>(items_.size()));
state->BeginArray("params.items");
for (const DisplayItem* item : items_) {
item->AsValueInto(state.get());
« cc/output/gl_renderer.cc ('K') | « cc/output/gl_renderer.cc ('k') | cc/quads/render_pass.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698