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

Unified Diff: cc/output/gl_renderer.cc

Issue 804373004: replace COMPILE_ASSERT with static_assert in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/output/geometry_binding.cc ('k') | cc/quads/largest_draw_quad.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index ee94a4c9f9b976e11ce81ee2867d31d4729e0699..2c1e3c87534441d4ca6cd72c6815638b38c5533f 100644
--- a/cc/output/gl_renderer.cc
+++ b/cc/output/gl_renderer.cc
@@ -2061,9 +2061,10 @@ void GLRenderer::FlushTextureQuadCache() {
DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
GLC(gl_, gl_->BindTexture(GL_TEXTURE_2D, locked_quad.texture_id()));
- COMPILE_ASSERT(sizeof(Float4) == 4 * sizeof(float), struct_is_densely_packed);
- COMPILE_ASSERT(sizeof(Float16) == 16 * sizeof(float),
- struct_is_densely_packed);
+ static_assert(sizeof(Float4) == 4 * sizeof(float),
+ "Float4 struct should be densely packed");
+ static_assert(sizeof(Float16) == 16 * sizeof(float),
+ "Float16 struct should be densely packed");
// Upload the tranforms for both points and uvs.
GLC(gl_,
« no previous file with comments | « cc/output/geometry_binding.cc ('k') | cc/quads/largest_draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698