summaryrefslogtreecommitdiffstats
path: root/cc/output/geometry_binding.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 16:35:04 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-29 16:35:04 +0000
commit060448534ff6b708ec19220c63c4d86efbe87b50 (patch)
tree047be1f580e7da573c772006cdd5290ba1cdf824 /cc/output/geometry_binding.cc
parented3e277f57affc9b369cb65e3720a1a8ee39b6e1 (diff)
downloadchromium_src-060448534ff6b708ec19220c63c4d86efbe87b50.zip
chromium_src-060448534ff6b708ec19220c63c4d86efbe87b50.tar.gz
chromium_src-060448534ff6b708ec19220c63c4d86efbe87b50.tar.bz2
Revert 191364 "cc: Add ‘chromium_code’: 1 to cc.gyp and cc_t..."
> cc: Add ‘chromium_code’: 1 to cc.gyp and cc_tests.gyp > > And fix compile errors that it causes. > > Review URL: https://codereview.chromium.org/13206004 TBR=danakj@chromium.org Review URL: https://codereview.chromium.org/13316003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191371 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;
}