Index: cc/output/gl_renderer.cc |
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc |
index c695429968234a6efa435bdca50d53067d913b47..b3161bbba57ac37ad25a59624f863f3ce50265ab 100644 |
--- a/cc/output/gl_renderer.cc |
+++ b/cc/output/gl_renderer.cc |
@@ -12,6 +12,7 @@ |
#include "base/logging.h" |
#include "base/memory/scoped_ptr.h" |
+#include "base/numerics/safe_conversions.h" |
#include "base/strings/string_split.h" |
#include "base/strings/string_util.h" |
#include "base/strings/stringprintf.h" |
@@ -2232,7 +2233,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { |
static_cast<float*>(&draw_cache_.vertex_opacity_data.front())); |
// Draw the quads! |
- gl_->DrawElements(GL_TRIANGLES, 6 * draw_cache_.matrix_data.size(), |
+ gl_->DrawElements(GL_TRIANGLES, |
+ 6 * base::checked_cast<int>(draw_cache_.matrix_data.size()), |
vmpstr
2015/06/05 01:03:00
This is the only checked_cast that I'm using, most
jschuh
2015/06/05 14:08:24
Yeah, it looks like the other locations should be
danakj
2015/06/05 18:22:29
matrix_data.size() is at most 8 (line 2299). Havin
vmpstr
2015/06/05 19:27:33
Ok, I changed this to a DCHECK. I think if this is
|
GL_UNSIGNED_SHORT, 0); |
// Clear the cache. |