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

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

Issue 1824433002: Remove getError() and synthesizeGLError() from WebGraphicsContext3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simples-tplus
Patch Set: 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 94c91a237de3b8b0eb863cbabeab49caa0f7af94..3e8d199abd5fbfa7dc4a2d1612b209b9639caac1 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLProgram.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLProgram.cpp
@@ -73,30 +73,6 @@ void WebGLProgram::deleteObjectImpl(WebGraphicsContext3D* context3d, gpu::gles2:
}
}
-unsigned WebGLProgram::numActiveAttribLocations()
-{
- cacheInfoIfNeeded();
- return m_activeAttribLocations.size();
-}
-
-GLint WebGLProgram::getActiveAttribLocation(GLuint index)
-{
- cacheInfoIfNeeded();
- if (index >= numActiveAttribLocations())
- return -1;
- return m_activeAttribLocations[index];
-}
-
-bool WebGLProgram::isUsingVertexAttrib0()
-{
- cacheInfoIfNeeded();
- for (unsigned ii = 0; ii < numActiveAttribLocations(); ++ii) {
- if (!getActiveAttribLocation(ii))
- return true;
- }
- return false;
-}
-
bool WebGLProgram::linkStatus()
{
cacheInfoIfNeeded();
@@ -171,20 +147,6 @@ bool WebGLProgram::detachShader(WebGLShader* shader)
}
}
-void WebGLProgram::cacheActiveAttribLocations(WebGraphicsContext3D* context3d, gpu::gles2::GLES2Interface* gl)
-{
- m_activeAttribLocations.clear();
-
- GLint numAttribs = 0;
- 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] = gl->GetAttribLocation(m_object, info.name.utf8().data());
- }
-}
-
void WebGLProgram::cacheInfoIfNeeded()
{
if (m_infoValid)
@@ -195,15 +157,13 @@ void WebGLProgram::cacheInfoIfNeeded()
if (!contextGroup())
return;
+ // TODO(danakj): Make this getAWebGLRenderingContextBase.
Ken Russell (switch to Gerrit) 2016/03/19 04:36:04 WebGLProgram::linkStatus() could be changed to tak
danakj 2016/03/21 22:45:13 Done.
WebGraphicsContext3D* context = contextGroup()->getAWebGraphicsContext3D();
if (!context)
return;
gpu::gles2::GLES2Interface* gl = context->getGLES2Interface();
- GLint linkStatus = 0;
- gl->GetProgramiv(m_object, GL_LINK_STATUS, &linkStatus);
- m_linkStatus = linkStatus;
- if (m_linkStatus)
- cacheActiveAttribLocations(context, gl);
+ m_linkStatus = 0;
+ gl->GetProgramiv(m_object, GL_LINK_STATUS, &m_linkStatus);
m_infoValid = true;
}

Powered by Google App Engine
This is Rietveld 408576698