summaryrefslogtreecommitdiffstats
path: root/cc/output/geometry_binding.cc
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 19:07:36 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 19:07:36 +0000
commit155399dd35c53dddae3d9dbcd7200c8f3999e6ef (patch)
tree3ffea43c0ee03e39e6e32d2069a84cf48eb55ed1 /cc/output/geometry_binding.cc
parent4c49e99611219800c5f85acd0bbc89f405622961 (diff)
downloadchromium_src-155399dd35c53dddae3d9dbcd7200c8f3999e6ef.zip
chromium_src-155399dd35c53dddae3d9dbcd7200c8f3999e6ef.tar.gz
chromium_src-155399dd35c53dddae3d9dbcd7200c8f3999e6ef.tar.bz2
Revert 191400 "cc: Add ‘chromium_code’: 1 to cc.gyp and cc_t..."
CrOS bots are unhappy > cc: Add ‘chromium_code’: 1 to cc.gyp and cc_tests.gyp > > And fix compile errors that it causes. > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=191364 > > Review URL: https://codereview.chromium.org/13206004 TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/13334005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191414 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/geometry_binding.cc')
-rw-r--r--cc/output/geometry_binding.cc36
1 files changed, 17 insertions, 19 deletions
diff --git a/cc/output/geometry_binding.cc b/cc/output/geometry_binding.cc
index f1092ce..20bd666 100644
--- a/cc/output/geometry_binding.cc
+++ b/cc/output/geometry_binding.cc
@@ -16,6 +16,14 @@ 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];
@@ -39,28 +47,18 @@ 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, .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,
+ 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 };
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;
}