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

Unified Diff: cc/program_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/priority_calculator.h ('k') | cc/resource_provider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « cc/priority_calculator.h ('k') | cc/resource_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698