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

Unified Diff: cc/output/geometry_binding.cc

Issue 734063004: Update from https://crrev.com/304418 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/geometry_binding.cc
diff --git a/cc/output/geometry_binding.cc b/cc/output/geometry_binding.cc
index b8c9759618551d9327f858af423d366624d51276..054a96293f12629eb3f014250ee754ae04df1edc 100644
--- a/cc/output/geometry_binding.cc
+++ b/cc/output/geometry_binding.cc
@@ -26,11 +26,9 @@ GeometryBinding::GeometryBinding(gpu::gles2::GLES2Interface* gl,
uint16 data[6];
};
- COMPILE_ASSERT(sizeof(Quad) == 24 * sizeof(float), // NOLINT(runtime/sizeof)
+ COMPILE_ASSERT(sizeof(Quad) == 24 * sizeof(float), struct_is_densely_packed);
+ COMPILE_ASSERT(sizeof(QuadIndex) == 6 * sizeof(uint16_t),
struct_is_densely_packed);
- COMPILE_ASSERT(
- sizeof(QuadIndex) == 6 * sizeof(uint16_t), // NOLINT(runtime/sizeof)
- struct_is_densely_packed);
Quad quad_list[8];
QuadIndex quad_index_list[8];
@@ -79,33 +77,17 @@ void GeometryBinding::PrepareForDraw() {
// "const GLvoid*" even though it is actually an offset into the buffer
// object's data store and not a pointer to the client's address space.
const void* offsets[3] = {
- 0, reinterpret_cast<const void*>(
- 3 * sizeof(float)), // NOLINT(runtime/sizeof)
- reinterpret_cast<const void*>(5 *
- sizeof(float)), // NOLINT(runtime/sizeof)
+ 0,
+ reinterpret_cast<const void*>(3 * sizeof(float)),
+ reinterpret_cast<const void*>(5 * sizeof(float)),
};
- GLC(gl_,
- gl_->VertexAttribPointer(PositionAttribLocation(),
- 3,
- GL_FLOAT,
- false,
- 6 * sizeof(float), // NOLINT(runtime/sizeof)
- offsets[0]));
- GLC(gl_,
- gl_->VertexAttribPointer(TexCoordAttribLocation(),
- 2,
- GL_FLOAT,
- false,
- 6 * sizeof(float), // NOLINT(runtime/sizeof)
- offsets[1]));
- GLC(gl_,
- gl_->VertexAttribPointer(TriangleIndexAttribLocation(),
- 1,
- GL_FLOAT,
- false,
- 6 * sizeof(float), // NOLINT(runtime/sizeof)
- offsets[2]));
+ GLC(gl_, gl_->VertexAttribPointer(PositionAttribLocation(), 3, GL_FLOAT,
+ false, 6 * sizeof(float), offsets[0]));
+ GLC(gl_, gl_->VertexAttribPointer(TexCoordAttribLocation(), 2, GL_FLOAT,
+ false, 6 * sizeof(float), offsets[1]));
+ GLC(gl_, gl_->VertexAttribPointer(TriangleIndexAttribLocation(), 1, GL_FLOAT,
+ false, 6 * sizeof(float), offsets[2]));
GLC(gl_, gl_->EnableVertexAttribArray(PositionAttribLocation()));
GLC(gl_, gl_->EnableVertexAttribArray(TexCoordAttribLocation()));
GLC(gl_, gl_->EnableVertexAttribArray(TriangleIndexAttribLocation()));
« no previous file with comments | « cc/layers/tiled_layer_unittest.cc ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698