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

Unified Diff: cc/output/geometry_binding.cc

Issue 13206004: cc: Fix build issues for adding ‘chromium_code’: 1 to cc.gyp and cc_tests.gyp (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months 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
Index: cc/output/geometry_binding.cc
diff --git a/cc/output/geometry_binding.cc b/cc/output/geometry_binding.cc
index 5c3db34c4e4f5b9e9f77a4e65dacfa280838a277..b8ba03d7436e27d64d08357f7aa73dd674f858f0 100644
--- a/cc/output/geometry_binding.cc
+++ b/cc/output/geometry_binding.cc
@@ -16,14 +16,6 @@ GeometryBinding::GeometryBinding(WebKit::WebGraphicsContext3D* context,
: context_(context),
quad_vertices_vbo_(0),
quad_elements_vbo_(0) {
- float vertices[] = {
- quad_vertex_rect.x(), quad_vertex_rect.bottom(), 0.0f, 0.0f,
- 1.0f, quad_vertex_rect.x(), quad_vertex_rect.y(), 0.0f,
- 0.0f, 0.0f, quad_vertex_rect.right(), quad_vertex_rect.y(),
- 0.0f, 1.0f, 0.0f, quad_vertex_rect.right(),
- quad_vertex_rect.bottom(), 0.0f, 1.0f, 1.0f
- };
-
struct Vertex {
float a_position[3];
float a_texCoord[2];
@@ -44,18 +36,28 @@ GeometryBinding::GeometryBinding(WebKit::WebGraphicsContext3D* context,
Quad quad_list[8];
QuadIndex quad_index_list[8];
for (int i = 0; i < 8; i++) {
- Vertex v0 = { quad_vertex_rect.x(), quad_vertex_rect.bottom(), 0.0f, 0.0f,
- 1.0f, i * 4.0f + 0.0f };
- Vertex v1 = { quad_vertex_rect.x(), quad_vertex_rect.y(), 0.0f, 0.0f, 0.0f,
+ Vertex v0 = { { quad_vertex_rect.x(), quad_vertex_rect.bottom(), 0.0f, },
+ { 0.0f, 1.0f, },
+ i * 4.0f + 0.0f };
+ Vertex v1 = { { quad_vertex_rect.x(), quad_vertex_rect.y(), 0.0f, },
+ { 0.0f, 0.0f, },
i * 4.0f + 1.0f };
- Vertex v2 = { quad_vertex_rect.right(), quad_vertex_rect.y(), 0.0f, 1.0f,
- 0.0f, i * 4.0f + 2.0f };
- Vertex v3 = { quad_vertex_rect.right(), quad_vertex_rect.bottom(), 0.0f,
- 1.0f, 1.0f, i * 4.0f + 3.0f };
+ Vertex v2 = { { quad_vertex_rect.right(), quad_vertex_rect.y(), 0.0f, },
+ { 1.0f, .0f, },
+ i * 4.0f + 2.0f };
+ Vertex v3 = { { quad_vertex_rect.right(),
+ quad_vertex_rect.bottom(),
+ 0.0f, },
+ { 1.0f, 1.0f, },
+ i * 4.0f + 3.0f };
Quad x = { v0, v1, v2, v3 };
quad_list[i] = x;
- QuadIndex y = { 0 + 4 * i, 1 + 4 * i, 2 + 4 * i, 3 + 4 * i, 0 + 4 * i,
- 2 + 4 * i };
+ QuadIndex y = { { 0 + 4 * i,
+ 1 + 4 * i,
+ 2 + 4 * i,
+ 3 + 4 * i,
+ 0 + 4 * i,
+ 2 + 4 * i } };
quad_index_list[i] = y;
}

Powered by Google App Engine
This is Rietveld 408576698