Index: cc/output/gl_renderer.cc |
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc |
index faf6bbb0119b0ebbcafb3f9aa5b73b3e44fd3a02..bce832522bf614286134a4e25af2a2444bf0dd49 100644 |
--- a/cc/output/gl_renderer.cc |
+++ b/cc/output/gl_renderer.cc |
@@ -2239,8 +2239,11 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { |
static_cast<int>(draw_cache_.vertex_opacity_data.size()), |
static_cast<float*>(&draw_cache_.vertex_opacity_data.front())); |
+ DCHECK_LE(draw_cache_.matrix_data.size(), |
+ static_cast<size_t>(std::numeric_limits<int>::max()) / 6u); |
Nico
2015/07/31 17:57:15
shouldn't this check that size() is lessequal than
vmpstr
2015/07/31 18:29:31
Yeah, I think that's clearly a much tighter bound.
|
// Draw the quads! |
- gl_->DrawElements(GL_TRIANGLES, 6 * draw_cache_.matrix_data.size(), |
+ gl_->DrawElements(GL_TRIANGLES, |
+ 6 * static_cast<int>(draw_cache_.matrix_data.size()), |
GL_UNSIGNED_SHORT, 0); |
// Clear the cache. |