Chromium Code Reviews| Index: cc/output/dynamic_geometry_binding.cc |
| diff --git a/cc/output/dynamic_geometry_binding.cc b/cc/output/dynamic_geometry_binding.cc |
| index 8eeff0c6b4a80e7339dd8f491c3a84dd9c027d10..b1cc0d29e207f750abd62b5b4eb55a4dfbfad16f 100644 |
| --- a/cc/output/dynamic_geometry_binding.cc |
| +++ b/cc/output/dynamic_geometry_binding.cc |
| @@ -12,14 +12,17 @@ namespace cc { |
| DynamicGeometryBinding::DynamicGeometryBinding(gpu::gles2::GLES2Interface* gl) |
| : gl_(gl), quad_vertices_vbo_(0), quad_elements_vbo_(0) { |
| - GeometryBindingQuad quads[8]; |
| - GeometryBindingQuadIndex quad_indices[8]; |
| + GeometryBindingQuad quads[1]; |
|
enne (OOO)
2015/02/27 21:36:01
Can you initialize this in the class itself rather
awoloszyn
2015/02/27 22:08:37
Done.
|
| + GeometryBindingQuadIndex quad_indices[1]; |
| static_assert(sizeof(GeometryBindingQuad) == 24 * sizeof(float), |
| "struct Quad should be densely packed"); |
| static_assert(sizeof(GeometryBindingQuadIndex) == 6 * sizeof(uint16_t), |
| "struct QuadIndex should be densely packed"); |
| + memset(quads, 0x00, sizeof(quads)); |
| + memset(quads, 0x00, sizeof(quad_indices)); |
| + |
| GLC(gl_, gl_->GenBuffers(1, &quad_vertices_vbo_)); |
| GLC(gl_, gl_->GenBuffers(1, &quad_elements_vbo_)); |