Index: cc/program_binding.cc |
diff --git a/cc/program_binding.cc b/cc/program_binding.cc |
index 4d88aa33c506657398876be98dd05244b010392c..80e8fac57d25cd854fc7db6ac2e915e523a52098 100644 |
--- a/cc/program_binding.cc |
+++ b/cc/program_binding.cc |
@@ -6,9 +6,9 @@ |
#include "ProgramBinding.h" |
+#include "third_party/khronos/GLES2/gl2.h" |
#include "CCRendererGL.h" // For the GLC() macro. |
#include "GeometryBinding.h" |
-#include "GraphicsContext3D.h" |
#include "TraceEvent.h" |
#include <public/WebGraphicsContext3D.h> |
@@ -35,21 +35,21 @@ ProgramBindingBase::~ProgramBindingBase() |
static bool contextLost(WebGraphicsContext3D* context) |
{ |
- return (context->getGraphicsResetStatusARB() != GraphicsContext3D::NO_ERROR); |
+ return (context->getGraphicsResetStatusARB() != GL_NO_ERROR); |
} |
void ProgramBindingBase::init(WebGraphicsContext3D* context, const std::string& vertexShader, const std::string& fragmentShader) |
{ |
TRACE_EVENT0("cc", "ProgramBindingBase::init"); |
- m_vertexShaderId = loadShader(context, GraphicsContext3D::VERTEX_SHADER, vertexShader); |
+ m_vertexShaderId = loadShader(context, GL_VERTEX_SHADER, vertexShader); |
if (!m_vertexShaderId) { |
if (!contextLost(context)) |
LOG_ERROR("Failed to create vertex shader"); |
return; |
} |
- m_fragmentShaderId = loadShader(context, GraphicsContext3D::FRAGMENT_SHADER, fragmentShader); |
+ m_fragmentShaderId = loadShader(context, GL_FRAGMENT_SHADER, fragmentShader); |
if (!m_fragmentShaderId) { |
GLC(context, context->deleteShader(m_vertexShaderId)); |
m_vertexShaderId = 0; |
@@ -68,7 +68,7 @@ void ProgramBindingBase::link(WebGraphicsContext3D* context) |
cleanupShaders(context); |
#ifndef NDEBUG |
int linked = 0; |
- GLC(context, context->getProgramiv(m_program, GraphicsContext3D::LINK_STATUS, &linked)); |
+ GLC(context, context->getProgramiv(m_program, GL_LINK_STATUS, &linked)); |
if (!linked) { |
if (!contextLost(context)) |
LOG_ERROR("Failed to link shader program"); |
@@ -100,7 +100,7 @@ unsigned ProgramBindingBase::loadShader(WebGraphicsContext3D* context, unsigned |
GLC(context, context->compileShader(shader)); |
#ifndef NDEBUG |
int compiled = 0; |
- GLC(context, context->getShaderiv(shader, GraphicsContext3D::COMPILE_STATUS, &compiled)); |
+ GLC(context, context->getShaderiv(shader, GL_COMPILE_STATUS, &compiled)); |
if (!compiled) { |
GLC(context, context->deleteShader(shader)); |
return 0; |