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

Unified Diff: cc/output/direct_renderer.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/output/direct_renderer.cc
diff --git a/cc/output/direct_renderer.cc b/cc/output/direct_renderer.cc
index 39158169b2092597736782dc7355e14d01d7840d..23801dba926c6c36739b936a3de3d265d1ab8a58 100644
--- a/cc/output/direct_renderer.cc
+++ b/cc/output/direct_renderer.cc
@@ -10,6 +10,7 @@
#include "base/containers/hash_tables.h"
#include "base/containers/scoped_ptr_hash_map.h"
#include "base/metrics/histogram.h"
+#include "base/numerics/safe_conversions.h"
#include "base/trace_event/trace_event.h"
#include "cc/base/math_util.h"
#include "cc/output/bsp_tree.h"
@@ -193,8 +194,9 @@ void DirectRenderer::DrawFrame(RenderPassList* render_passes_in_draw_order,
const gfx::Rect& device_clip_rect,
bool disable_picture_quad_image_filtering) {
TRACE_EVENT0("cc", "DirectRenderer::DrawFrame");
- UMA_HISTOGRAM_COUNTS("Renderer4.renderPassCount",
- render_passes_in_draw_order->size());
+ UMA_HISTOGRAM_COUNTS(
+ "Renderer4.renderPassCount",
+ base::saturated_cast<int>(render_passes_in_draw_order->size()));
const RenderPass* root_render_pass = render_passes_in_draw_order->back();
DCHECK(root_render_pass);
« no previous file with comments | « cc/layers/layer_iterator.h ('k') | cc/output/gl_renderer.cc » ('j') | cc/output/gl_renderer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698