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

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGLProgram.cpp

Issue 1808403002: Move simple methods [F-S] from WebGraphicsContext3D to GLES2Interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bindFoo
Patch Set: simples-fplus: tests Created 4 years, 9 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
Index: third_party/WebKit/Source/modules/webgl/WebGLProgram.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLProgram.cpp b/third_party/WebKit/Source/modules/webgl/WebGLProgram.cpp
index ac1648ed0fbdc7980b20c28bd32ee13896c51b5d..f4ea87d2887a3f4ac183aab3043258cea3e4e79f 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLProgram.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLProgram.cpp
@@ -25,6 +25,7 @@
#include "modules/webgl/WebGLProgram.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
#include "modules/webgl/WebGLContextGroup.h"
#include "modules/webgl/WebGLRenderingContextBase.h"
@@ -170,17 +171,17 @@ bool WebGLProgram::detachShader(WebGLShader* shader)
}
}
-void WebGLProgram::cacheActiveAttribLocations(WebGraphicsContext3D* context3d)
+void WebGLProgram::cacheActiveAttribLocations(WebGraphicsContext3D* context3d, gpu::gles2::GLES2Interface* gl)
{
m_activeAttribLocations.clear();
GLint numAttribs = 0;
- context3d->getProgramiv(m_object, GL_ACTIVE_ATTRIBUTES, &numAttribs);
+ gl->GetProgramiv(m_object, GL_ACTIVE_ATTRIBUTES, &numAttribs);
m_activeAttribLocations.resize(static_cast<size_t>(numAttribs));
for (int i = 0; i < numAttribs; ++i) {
WebGraphicsContext3D::ActiveInfo info;
context3d->getActiveAttrib(m_object, i, info);
- m_activeAttribLocations[i] = context3d->getAttribLocation(m_object, info.name.utf8().data());
+ m_activeAttribLocations[i] = gl->GetAttribLocation(m_object, info.name.utf8().data());
}
}
@@ -197,11 +198,12 @@ void WebGLProgram::cacheInfoIfNeeded()
WebGraphicsContext3D* context = contextGroup()->getAWebGraphicsContext3D();
if (!context)
return;
+ gpu::gles2::GLES2Interface* gl = context->getGLES2Interface();
GLint linkStatus = 0;
- context->getProgramiv(m_object, GL_LINK_STATUS, &linkStatus);
+ gl->GetProgramiv(m_object, GL_LINK_STATUS, &linkStatus);
m_linkStatus = linkStatus;
if (m_linkStatus)
- cacheActiveAttribLocations(context);
+ cacheActiveAttribLocations(context, gl);
m_infoValid = true;
}
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLProgram.h ('k') | third_party/WebKit/Source/modules/webgl/WebGLQuery.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698