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

Unified Diff: cc/geometry_binding.cc

Issue 11150025: Patch from https://codereview.chromium.org/11111005/ without actual file deletes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
« no previous file with comments | « cc/frame_buffer_skpicture_canvas_layer_texture_updater.cc ('k') | cc/gl_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/geometry_binding.cc
diff --git a/cc/geometry_binding.cc b/cc/geometry_binding.cc
index 8656a487f48f4800afa2d6e916494fe4639d798d..5ea1db7a2f7fdf0a28058af6b250e58d6c1f01f2 100644
--- a/cc/geometry_binding.cc
+++ b/cc/geometry_binding.cc
@@ -6,8 +6,8 @@
#include "GeometryBinding.h"
+#include "third_party/khronos/GLES2/gl2.h"
#include "CCRendererGL.h" // For the GLC() macro.
-#include "GraphicsContext3D.h"
#include <public/WebGraphicsContext3D.h>
namespace cc {
@@ -28,10 +28,10 @@ GeometryBinding::GeometryBinding(WebKit::WebGraphicsContext3D* context, const Fl
GLC(m_context, m_quadVerticesVbo = m_context->createBuffer());
GLC(m_context, m_quadElementsVbo = m_context->createBuffer());
- GLC(m_context, m_context->bindBuffer(GraphicsContext3D::ARRAY_BUFFER, m_quadVerticesVbo));
- GLC(m_context, m_context->bufferData(GraphicsContext3D::ARRAY_BUFFER, sizeof(vertices), vertices, GraphicsContext3D::STATIC_DRAW));
- GLC(m_context, m_context->bindBuffer(GraphicsContext3D::ELEMENT_ARRAY_BUFFER, m_quadElementsVbo));
- GLC(m_context, m_context->bufferData(GraphicsContext3D::ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, GraphicsContext3D::STATIC_DRAW));
+ GLC(m_context, m_context->bindBuffer(GL_ARRAY_BUFFER, m_quadVerticesVbo));
+ GLC(m_context, m_context->bufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW));
+ GLC(m_context, m_context->bindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_quadElementsVbo));
+ GLC(m_context, m_context->bufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(indices), indices, GL_STATIC_DRAW));
m_initialized = true;
}
@@ -44,12 +44,12 @@ GeometryBinding::~GeometryBinding()
void GeometryBinding::prepareForDraw()
{
- GLC(m_context, m_context->bindBuffer(GraphicsContext3D::ARRAY_BUFFER, quadVerticesVbo()));
- GLC(m_context, m_context->bindBuffer(GraphicsContext3D::ELEMENT_ARRAY_BUFFER, quadElementsVbo()));
+ GLC(m_context, m_context->bindBuffer(GL_ARRAY_BUFFER, quadVerticesVbo()));
+ GLC(m_context, m_context->bindBuffer(GL_ELEMENT_ARRAY_BUFFER, quadElementsVbo()));
unsigned offset = 0;
- GLC(m_context, m_context->vertexAttribPointer(positionAttribLocation(), 3, GraphicsContext3D::FLOAT, false, 5 * sizeof(float), offset));
+ GLC(m_context, m_context->vertexAttribPointer(positionAttribLocation(), 3, GL_FLOAT, false, 5 * sizeof(float), offset));
offset += 3 * sizeof(float);
- GLC(m_context, m_context->vertexAttribPointer(texCoordAttribLocation(), 2, GraphicsContext3D::FLOAT, false, 5 * sizeof(float), offset));
+ GLC(m_context, m_context->vertexAttribPointer(texCoordAttribLocation(), 2, GL_FLOAT, false, 5 * sizeof(float), offset));
GLC(m_context, m_context->enableVertexAttribArray(positionAttribLocation()));
GLC(m_context, m_context->enableVertexAttribArray(texCoordAttribLocation()));
}
« no previous file with comments | « cc/frame_buffer_skpicture_canvas_layer_texture_updater.cc ('k') | cc/gl_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698