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

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

Issue 1815803003: Move simple methods [T-Z] from WebGraphicsContext3D to GLES2Interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@simples-fplus
Patch Set: simples-tplus: fixed 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/WebGLRenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 12560c5cadb4445e66fded26b7628909e0a71ab2..b62b7d4da07522baeaa88b20bec994b1d701239d 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -980,7 +980,7 @@ void WebGLRenderingContextBase::initializeNewContext()
m_vertexAttribType.resize(m_maxVertexAttribs);
- webContext()->viewport(0, 0, drawingBufferWidth(), drawingBufferHeight());
+ contextGL()->Viewport(0, 0, drawingBufferWidth(), drawingBufferHeight());
contextGL()->Scissor(0, 0, drawingBufferWidth(), drawingBufferHeight());
m_contextLostCallbackAdapter = WebGLRenderingContextLostCallback::create(this);
@@ -1930,7 +1930,7 @@ bool WebGLRenderingContextBase::deleteObject(WebGLObject* object)
if (object->hasObject()) {
// We need to pass in context here because we want
// things in this context unbound.
- object->deleteObject(webContext());
+ object->deleteObject(webContext(), contextGL());
}
return true;
}
@@ -2053,7 +2053,7 @@ void WebGLRenderingContextBase::detachShader(ScriptState* scriptState, WebGLProg
return;
}
contextGL()->DetachShader(objectOrZero(program), objectOrZero(shader));
- shader->onDetached(webContext());
+ shader->onDetached(webContext(), contextGL());
preserveObjectWrapper(scriptState, program, "shader", shader->type(), nullptr);
}
@@ -2140,7 +2140,7 @@ void WebGLRenderingContextBase::drawArraysInstancedANGLE(GLenum mode, GLint firs
return;
clearIfComposited();
- webContext()->drawArraysInstancedANGLE(mode, first, count, primcount);
+ contextGL()->DrawArraysInstancedANGLE(mode, first, count, primcount);
markContextChanged(CanvasChanged);
}
@@ -2150,7 +2150,7 @@ void WebGLRenderingContextBase::drawElementsInstancedANGLE(GLenum mode, GLsizei
return;
clearIfComposited();
- webContext()->drawElementsInstancedANGLE(mode, count, type, static_cast<GLintptr>(offset), primcount);
+ contextGL()->DrawElementsInstancedANGLE(mode, count, type, reinterpret_cast<void*>(static_cast<intptr_t>(offset)), primcount);
markContextChanged(CanvasChanged);
}
@@ -3814,21 +3814,21 @@ void WebGLRenderingContextBase::subscribeValueCHROMIUM(GLenum target, GLenum sub
{
if (isContextLost())
return;
- webContext()->subscribeValueCHROMIUM(target, subscription);
+ contextGL()->SubscribeValueCHROMIUM(target, subscription);
}
void WebGLRenderingContextBase::populateSubscribedValuesCHROMIUM(GLenum target)
{
if (isContextLost())
return;
- webContext()->populateSubscribedValuesCHROMIUM(target);
+ contextGL()->PopulateSubscribedValuesCHROMIUM(target);
}
void WebGLRenderingContextBase::uniformValuebufferCHROMIUM(const WebGLUniformLocation* location, GLenum target, GLenum subscription)
{
if (isContextLost() || !location)
return;
- webContext()->uniformValuebufferCHROMIUM(location->location(), target, subscription);
+ contextGL()->UniformValuebufferCHROMIUM(location->location(), target, subscription);
}
GLenum WebGLRenderingContextBase::convertTexInternalFormat(GLenum internalformat, GLenum type)
@@ -3846,7 +3846,7 @@ GLenum WebGLRenderingContextBase::convertTexInternalFormat(GLenum internalformat
void WebGLRenderingContextBase::texImage2DBase(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels)
{
// All calling functions check isContextLost, so a duplicate check is not needed here.
- webContext()->texImage2D(target, level, convertTexInternalFormat(internalformat, type), width, height, border, format, type, pixels);
+ contextGL()->TexImage2D(target, level, convertTexInternalFormat(internalformat, type), width, height, border, format, type, pixels);
}
void WebGLRenderingContextBase::texImage2DImpl(GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, Image* image, WebGLImageConversion::ImageHtmlDomSource domSource, bool flipY, bool premultiplyAlpha)
@@ -4064,11 +4064,11 @@ void WebGLRenderingContextBase::texImageCanvasByGPU(TexImageByGPUType functionTy
targetType = GL_UNSIGNED_BYTE;
targetTexture = webContext()->createTexture();
contextGL()->BindTexture(GL_TEXTURE_2D, targetTexture);
- webContext()->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- webContext()->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- webContext()->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- webContext()->texParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- webContext()->texImage2D(GL_TEXTURE_2D, 0, targetInternalformat, canvas->width(),
+ contextGL()->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+ contextGL()->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ contextGL()->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+ contextGL()->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ contextGL()->TexImage2D(GL_TEXTURE_2D, 0, targetInternalformat, canvas->width(),
canvas->height(), 0, GL_RGBA, targetType, 0);
}
@@ -4271,9 +4271,9 @@ void WebGLRenderingContextBase::texParameter(GLenum target, GLenum pname, GLfloa
return;
}
if (isFloat) {
- webContext()->texParameterf(target, pname, paramf);
+ contextGL()->TexParameterf(target, pname, paramf);
} else {
- webContext()->texParameteri(target, pname, parami);
+ contextGL()->TexParameteri(target, pname, parami);
}
}
@@ -4315,7 +4315,7 @@ void WebGLRenderingContextBase::texSubImage2DImpl(GLenum target, GLint level, GL
}
resetUnpackParameters();
- webContext()->texSubImage2D(target, level, xoffset, yoffset, imageExtractor.imageWidth(), imageExtractor.imageHeight(), format, type, needConversion ? data.data() : imagePixelData);
+ contextGL()->TexSubImage2D(target, level, xoffset, yoffset, imageExtractor.imageWidth(), imageExtractor.imageHeight(), format, type, needConversion ? data.data() : imagePixelData);
restoreUnpackParameters();
}
@@ -4343,7 +4343,7 @@ void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint
}
if (changeUnpackAlignment)
resetUnpackParameters();
- webContext()->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data);
+ contextGL()->TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data);
if (changeUnpackAlignment)
restoreUnpackParameters();
}
@@ -4382,7 +4382,7 @@ void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint
}
}
resetUnpackParameters();
- webContext()->texSubImage2D(target, level, xoffset, yoffset, pixels->width(), pixels->height(), format, type, needConversion ? data.data() : pixels->data()->data());
+ contextGL()->TexSubImage2D(target, level, xoffset, yoffset, pixels->width(), pixels->height(), format, type, needConversion ? data.data() : pixels->data()->data());
restoreUnpackParameters();
}
@@ -4487,7 +4487,7 @@ void WebGLRenderingContextBase::texSubImage2D(GLenum target, GLint level, GLint
}
}
resetUnpackParameters();
- webContext()->texSubImage2D(target, level, xoffset, yoffset, bitmap->width(), bitmap->height(), format, type, needConversion ? data.data() : pixelData.get());
+ contextGL()->TexSubImage2D(target, level, xoffset, yoffset, bitmap->width(), bitmap->height(), format, type, needConversion ? data.data() : pixelData.get());
restoreUnpackParameters();
}
@@ -4501,7 +4501,7 @@ void WebGLRenderingContextBase::uniform1f(const WebGLUniformLocation* location,
return;
}
- webContext()->uniform1f(location->location(), x);
+ contextGL()->Uniform1f(location->location(), x);
}
void WebGLRenderingContextBase::uniform1fv(const WebGLUniformLocation* location, const FlexibleFloat32ArrayView& v)
@@ -4509,7 +4509,7 @@ void WebGLRenderingContextBase::uniform1fv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters<WTF::Float32Array>("uniform1fv", location, v, 1))
return;
- webContext()->uniform1fv(location->location(), v.length(), v.dataMaybeOnStack());
+ contextGL()->Uniform1fv(location->location(), v.length(), v.dataMaybeOnStack());
}
void WebGLRenderingContextBase::uniform1fv(const WebGLUniformLocation* location, Vector<GLfloat>& v)
@@ -4517,7 +4517,7 @@ void WebGLRenderingContextBase::uniform1fv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters("uniform1fv", location, v.data(), v.size(), 1))
return;
- webContext()->uniform1fv(location->location(), v.size(), v.data());
+ contextGL()->Uniform1fv(location->location(), v.size(), v.data());
}
void WebGLRenderingContextBase::uniform1i(const WebGLUniformLocation* location, GLint x)
@@ -4530,7 +4530,7 @@ void WebGLRenderingContextBase::uniform1i(const WebGLUniformLocation* location,
return;
}
- webContext()->uniform1i(location->location(), x);
+ contextGL()->Uniform1i(location->location(), x);
}
void WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location, const FlexibleInt32ArrayView& v)
@@ -4538,7 +4538,7 @@ void WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters<WTF::Int32Array>("uniform1iv", location, v, 1))
return;
- webContext()->uniform1iv(location->location(), v.length(), v.dataMaybeOnStack());
+ contextGL()->Uniform1iv(location->location(), v.length(), v.dataMaybeOnStack());
}
void WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location, Vector<GLint>& v)
@@ -4546,7 +4546,7 @@ void WebGLRenderingContextBase::uniform1iv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters("uniform1iv", location, v.data(), v.size(), 1))
return;
- webContext()->uniform1iv(location->location(), v.size(), v.data());
+ contextGL()->Uniform1iv(location->location(), v.size(), v.data());
}
void WebGLRenderingContextBase::uniform2f(const WebGLUniformLocation* location, GLfloat x, GLfloat y)
@@ -4559,7 +4559,7 @@ void WebGLRenderingContextBase::uniform2f(const WebGLUniformLocation* location,
return;
}
- webContext()->uniform2f(location->location(), x, y);
+ contextGL()->Uniform2f(location->location(), x, y);
}
void WebGLRenderingContextBase::uniform2fv(const WebGLUniformLocation* location, const FlexibleFloat32ArrayView& v)
@@ -4567,7 +4567,7 @@ void WebGLRenderingContextBase::uniform2fv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters<WTF::Float32Array>("uniform2fv", location, v, 2))
return;
- webContext()->uniform2fv(location->location(), v.length() >> 1, v.dataMaybeOnStack());
+ contextGL()->Uniform2fv(location->location(), v.length() >> 1, v.dataMaybeOnStack());
}
void WebGLRenderingContextBase::uniform2fv(const WebGLUniformLocation* location, Vector<GLfloat>& v)
@@ -4575,7 +4575,7 @@ void WebGLRenderingContextBase::uniform2fv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters("uniform2fv", location, v.data(), v.size(), 2))
return;
- webContext()->uniform2fv(location->location(), v.size() >> 1, v.data());
+ contextGL()->Uniform2fv(location->location(), v.size() >> 1, v.data());
}
void WebGLRenderingContextBase::uniform2i(const WebGLUniformLocation* location, GLint x, GLint y)
@@ -4588,7 +4588,7 @@ void WebGLRenderingContextBase::uniform2i(const WebGLUniformLocation* location,
return;
}
- webContext()->uniform2i(location->location(), x, y);
+ contextGL()->Uniform2i(location->location(), x, y);
}
void WebGLRenderingContextBase::uniform2iv(const WebGLUniformLocation* location, const FlexibleInt32ArrayView& v)
@@ -4596,7 +4596,7 @@ void WebGLRenderingContextBase::uniform2iv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters<WTF::Int32Array>("uniform2iv", location, v, 2))
return;
- webContext()->uniform2iv(location->location(), v.length() >> 1, v.dataMaybeOnStack());
+ contextGL()->Uniform2iv(location->location(), v.length() >> 1, v.dataMaybeOnStack());
}
void WebGLRenderingContextBase::uniform2iv(const WebGLUniformLocation* location, Vector<GLint>& v)
@@ -4604,7 +4604,7 @@ void WebGLRenderingContextBase::uniform2iv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters("uniform2iv", location, v.data(), v.size(), 2))
return;
- webContext()->uniform2iv(location->location(), v.size() >> 1, v.data());
+ contextGL()->Uniform2iv(location->location(), v.size() >> 1, v.data());
}
void WebGLRenderingContextBase::uniform3f(const WebGLUniformLocation* location, GLfloat x, GLfloat y, GLfloat z)
@@ -4617,7 +4617,7 @@ void WebGLRenderingContextBase::uniform3f(const WebGLUniformLocation* location,
return;
}
- webContext()->uniform3f(location->location(), x, y, z);
+ contextGL()->Uniform3f(location->location(), x, y, z);
}
void WebGLRenderingContextBase::uniform3fv(const WebGLUniformLocation* location, const FlexibleFloat32ArrayView& v)
@@ -4625,7 +4625,7 @@ void WebGLRenderingContextBase::uniform3fv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters<WTF::Float32Array>("uniform3fv", location, v, 3))
return;
- webContext()->uniform3fv(location->location(), v.length() / 3, v.dataMaybeOnStack());
+ contextGL()->Uniform3fv(location->location(), v.length() / 3, v.dataMaybeOnStack());
}
void WebGLRenderingContextBase::uniform3fv(const WebGLUniformLocation* location, Vector<GLfloat>& v)
@@ -4633,7 +4633,7 @@ void WebGLRenderingContextBase::uniform3fv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters("uniform3fv", location, v.data(), v.size(), 3))
return;
- webContext()->uniform3fv(location->location(), v.size() / 3, v.data());
+ contextGL()->Uniform3fv(location->location(), v.size() / 3, v.data());
}
void WebGLRenderingContextBase::uniform3i(const WebGLUniformLocation* location, GLint x, GLint y, GLint z)
@@ -4646,7 +4646,7 @@ void WebGLRenderingContextBase::uniform3i(const WebGLUniformLocation* location,
return;
}
- webContext()->uniform3i(location->location(), x, y, z);
+ contextGL()->Uniform3i(location->location(), x, y, z);
}
void WebGLRenderingContextBase::uniform3iv(const WebGLUniformLocation* location, const FlexibleInt32ArrayView& v)
@@ -4654,7 +4654,7 @@ void WebGLRenderingContextBase::uniform3iv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters<WTF::Int32Array>("uniform3iv", location, v, 3))
return;
- webContext()->uniform3iv(location->location(), v.length() / 3, v.dataMaybeOnStack());
+ contextGL()->Uniform3iv(location->location(), v.length() / 3, v.dataMaybeOnStack());
}
void WebGLRenderingContextBase::uniform3iv(const WebGLUniformLocation* location, Vector<GLint>& v)
@@ -4662,7 +4662,7 @@ void WebGLRenderingContextBase::uniform3iv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters("uniform3iv", location, v.data(), v.size(), 3))
return;
- webContext()->uniform3iv(location->location(), v.size() / 3, v.data());
+ contextGL()->Uniform3iv(location->location(), v.size() / 3, v.data());
}
void WebGLRenderingContextBase::uniform4f(const WebGLUniformLocation* location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
@@ -4675,7 +4675,7 @@ void WebGLRenderingContextBase::uniform4f(const WebGLUniformLocation* location,
return;
}
- webContext()->uniform4f(location->location(), x, y, z, w);
+ contextGL()->Uniform4f(location->location(), x, y, z, w);
}
void WebGLRenderingContextBase::uniform4fv(const WebGLUniformLocation* location, const FlexibleFloat32ArrayView& v)
@@ -4683,7 +4683,7 @@ void WebGLRenderingContextBase::uniform4fv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters<WTF::Float32Array>("uniform4fv", location, v, 4))
return;
- webContext()->uniform4fv(location->location(), v.length() >> 2, v.dataMaybeOnStack());
+ contextGL()->Uniform4fv(location->location(), v.length() >> 2, v.dataMaybeOnStack());
}
void WebGLRenderingContextBase::uniform4fv(const WebGLUniformLocation* location, Vector<GLfloat>& v)
@@ -4691,7 +4691,7 @@ void WebGLRenderingContextBase::uniform4fv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters("uniform4fv", location, v.data(), v.size(), 4))
return;
- webContext()->uniform4fv(location->location(), v.size() >> 2, v.data());
+ contextGL()->Uniform4fv(location->location(), v.size() >> 2, v.data());
}
void WebGLRenderingContextBase::uniform4i(const WebGLUniformLocation* location, GLint x, GLint y, GLint z, GLint w)
@@ -4704,7 +4704,7 @@ void WebGLRenderingContextBase::uniform4i(const WebGLUniformLocation* location,
return;
}
- webContext()->uniform4i(location->location(), x, y, z, w);
+ contextGL()->Uniform4i(location->location(), x, y, z, w);
}
void WebGLRenderingContextBase::uniform4iv(const WebGLUniformLocation* location, const FlexibleInt32ArrayView& v)
@@ -4712,7 +4712,7 @@ void WebGLRenderingContextBase::uniform4iv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters<WTF::Int32Array>("uniform4iv", location, v, 4))
return;
- webContext()->uniform4iv(location->location(), v.length() >> 2, v.dataMaybeOnStack());
+ contextGL()->Uniform4iv(location->location(), v.length() >> 2, v.dataMaybeOnStack());
}
void WebGLRenderingContextBase::uniform4iv(const WebGLUniformLocation* location, Vector<GLint>& v)
@@ -4720,49 +4720,49 @@ void WebGLRenderingContextBase::uniform4iv(const WebGLUniformLocation* location,
if (isContextLost() || !validateUniformParameters("uniform4iv", location, v.data(), v.size(), 4))
return;
- webContext()->uniform4iv(location->location(), v.size() >> 2, v.data());
+ contextGL()->Uniform4iv(location->location(), v.size() >> 2, v.data());
}
void WebGLRenderingContextBase::uniformMatrix2fv(const WebGLUniformLocation* location, GLboolean transpose, DOMFloat32Array* v)
{
if (isContextLost() || !validateUniformMatrixParameters("uniformMatrix2fv", location, transpose, v, 4))
return;
- webContext()->uniformMatrix2fv(location->location(), v->length() >> 2, transpose, v->data());
+ contextGL()->UniformMatrix2fv(location->location(), v->length() >> 2, transpose, v->data());
}
void WebGLRenderingContextBase::uniformMatrix2fv(const WebGLUniformLocation* location, GLboolean transpose, Vector<GLfloat>& v)
{
if (isContextLost() || !validateUniformMatrixParameters("uniformMatrix2fv", location, transpose, v.data(), v.size(), 4))
return;
- webContext()->uniformMatrix2fv(location->location(), v.size() >> 2, transpose, v.data());
+ contextGL()->UniformMatrix2fv(location->location(), v.size() >> 2, transpose, v.data());
}
void WebGLRenderingContextBase::uniformMatrix3fv(const WebGLUniformLocation* location, GLboolean transpose, DOMFloat32Array* v)
{
if (isContextLost() || !validateUniformMatrixParameters("uniformMatrix3fv", location, transpose, v, 9))
return;
- webContext()->uniformMatrix3fv(location->location(), v->length() / 9, transpose, v->data());
+ contextGL()->UniformMatrix3fv(location->location(), v->length() / 9, transpose, v->data());
}
void WebGLRenderingContextBase::uniformMatrix3fv(const WebGLUniformLocation* location, GLboolean transpose, Vector<GLfloat>& v)
{
if (isContextLost() || !validateUniformMatrixParameters("uniformMatrix3fv", location, transpose, v.data(), v.size(), 9))
return;
- webContext()->uniformMatrix3fv(location->location(), v.size() / 9, transpose, v.data());
+ contextGL()->UniformMatrix3fv(location->location(), v.size() / 9, transpose, v.data());
}
void WebGLRenderingContextBase::uniformMatrix4fv(const WebGLUniformLocation* location, GLboolean transpose, DOMFloat32Array* v)
{
if (isContextLost() || !validateUniformMatrixParameters("uniformMatrix4fv", location, transpose, v, 16))
return;
- webContext()->uniformMatrix4fv(location->location(), v->length() >> 4, transpose, v->data());
+ contextGL()->UniformMatrix4fv(location->location(), v->length() >> 4, transpose, v->data());
}
void WebGLRenderingContextBase::uniformMatrix4fv(const WebGLUniformLocation* location, GLboolean transpose, Vector<GLfloat>& v)
{
if (isContextLost() || !validateUniformMatrixParameters("uniformMatrix4fv", location, transpose, v.data(), v.size(), 16))
return;
- webContext()->uniformMatrix4fv(location->location(), v.size() >> 4, transpose, v.data());
+ contextGL()->UniformMatrix4fv(location->location(), v.size() >> 4, transpose, v.data());
}
void WebGLRenderingContextBase::useProgram(ScriptState* scriptState, WebGLProgram* program)
@@ -4784,9 +4784,9 @@ void WebGLRenderingContextBase::useProgram(ScriptState* scriptState, WebGLProgra
if (m_currentProgram != program) {
if (m_currentProgram)
- m_currentProgram->onDetached(webContext());
+ m_currentProgram->onDetached(webContext(), contextGL());
m_currentProgram = program;
- webContext()->useProgram(objectOrZero(program));
+ contextGL()->UseProgram(objectOrZero(program));
if (program)
program->onAttached();
preserveObjectWrapper(scriptState, this, "program", 0, program);
@@ -4797,7 +4797,7 @@ void WebGLRenderingContextBase::validateProgram(WebGLProgram* program)
{
if (isContextLost() || !validateWebGLObject("validateProgram", program))
return;
- webContext()->validateProgram(objectOrZero(program));
+ contextGL()->ValidateProgram(objectOrZero(program));
}
void WebGLRenderingContextBase::setVertexAttribType(GLuint index, VertexAttribValueType type)
@@ -4810,7 +4810,7 @@ void WebGLRenderingContextBase::vertexAttrib1f(GLuint index, GLfloat v0)
{
if (isContextLost())
return;
- webContext()->vertexAttrib1f(index, v0);
+ contextGL()->VertexAttrib1f(index, v0);
setVertexAttribType(index, Float32ArrayType);
}
@@ -4822,7 +4822,7 @@ void WebGLRenderingContextBase::vertexAttrib1fv(GLuint index, const DOMFloat32Ar
synthesizeGLError(GL_INVALID_VALUE, "vertexAttrib1fv", "invalid array");
return;
}
- webContext()->vertexAttrib1fv(index, v->data());
+ contextGL()->VertexAttrib1fv(index, v->data());
setVertexAttribType(index, Float32ArrayType);
}
@@ -4834,7 +4834,7 @@ void WebGLRenderingContextBase::vertexAttrib1fv(GLuint index, const Vector<GLflo
synthesizeGLError(GL_INVALID_VALUE, "vertexAttrib1fv", "invalid array");
return;
}
- webContext()->vertexAttrib1fv(index, v.data());
+ contextGL()->VertexAttrib1fv(index, v.data());
setVertexAttribType(index, Float32ArrayType);
}
@@ -4842,7 +4842,7 @@ void WebGLRenderingContextBase::vertexAttrib2f(GLuint index, GLfloat v0, GLfloat
{
if (isContextLost())
return;
- webContext()->vertexAttrib2f(index, v0, v1);
+ contextGL()->VertexAttrib2f(index, v0, v1);
setVertexAttribType(index, Float32ArrayType);
}
@@ -4854,7 +4854,7 @@ void WebGLRenderingContextBase::vertexAttrib2fv(GLuint index, const DOMFloat32Ar
synthesizeGLError(GL_INVALID_VALUE, "vertexAttrib2fv", "invalid array");
return;
}
- webContext()->vertexAttrib2fv(index, v->data());
+ contextGL()->VertexAttrib2fv(index, v->data());
setVertexAttribType(index, Float32ArrayType);
}
@@ -4866,7 +4866,7 @@ void WebGLRenderingContextBase::vertexAttrib2fv(GLuint index, const Vector<GLflo
synthesizeGLError(GL_INVALID_VALUE, "vertexAttrib2fv", "invalid array");
return;
}
- webContext()->vertexAttrib2fv(index, v.data());
+ contextGL()->VertexAttrib2fv(index, v.data());
setVertexAttribType(index, Float32ArrayType);
}
@@ -4874,7 +4874,7 @@ void WebGLRenderingContextBase::vertexAttrib3f(GLuint index, GLfloat v0, GLfloat
{
if (isContextLost())
return;
- webContext()->vertexAttrib3f(index, v0, v1, v2);
+ contextGL()->VertexAttrib3f(index, v0, v1, v2);
setVertexAttribType(index, Float32ArrayType);
}
@@ -4886,7 +4886,7 @@ void WebGLRenderingContextBase::vertexAttrib3fv(GLuint index, const DOMFloat32Ar
synthesizeGLError(GL_INVALID_VALUE, "vertexAttrib3fv", "invalid array");
return;
}
- webContext()->vertexAttrib3fv(index, v->data());
+ contextGL()->VertexAttrib3fv(index, v->data());
setVertexAttribType(index, Float32ArrayType);
}
@@ -4898,7 +4898,7 @@ void WebGLRenderingContextBase::vertexAttrib3fv(GLuint index, const Vector<GLflo
synthesizeGLError(GL_INVALID_VALUE, "vertexAttrib3fv", "invalid array");
return;
}
- webContext()->vertexAttrib3fv(index, v.data());
+ contextGL()->VertexAttrib3fv(index, v.data());
setVertexAttribType(index, Float32ArrayType);
}
@@ -4906,7 +4906,7 @@ void WebGLRenderingContextBase::vertexAttrib4f(GLuint index, GLfloat v0, GLfloat
{
if (isContextLost())
return;
- webContext()->vertexAttrib4f(index, v0, v1, v2, v3);
+ contextGL()->VertexAttrib4f(index, v0, v1, v2, v3);
setVertexAttribType(index, Float32ArrayType);
}
@@ -4918,7 +4918,7 @@ void WebGLRenderingContextBase::vertexAttrib4fv(GLuint index, const DOMFloat32Ar
synthesizeGLError(GL_INVALID_VALUE, "vertexAttrib4fv", "invalid array");
return;
}
- webContext()->vertexAttrib4fv(index, v->data());
+ contextGL()->VertexAttrib4fv(index, v->data());
setVertexAttribType(index, Float32ArrayType);
}
@@ -4930,7 +4930,7 @@ void WebGLRenderingContextBase::vertexAttrib4fv(GLuint index, const Vector<GLflo
synthesizeGLError(GL_INVALID_VALUE, "vertexAttrib4fv", "invalid array");
return;
}
- webContext()->vertexAttrib4fv(index, v.data());
+ contextGL()->VertexAttrib4fv(index, v.data());
setVertexAttribType(index, Float32ArrayType);
}
@@ -4965,14 +4965,14 @@ void WebGLRenderingContextBase::vertexAttribDivisorANGLE(GLuint index, GLuint di
return;
}
- webContext()->vertexAttribDivisorANGLE(index, divisor);
+ contextGL()->VertexAttribDivisorANGLE(index, divisor);
}
void WebGLRenderingContextBase::viewport(GLint x, GLint y, GLsizei width, GLsizei height)
{
if (isContextLost())
return;
- webContext()->viewport(x, y, width, height);
+ contextGL()->Viewport(x, y, width, height);
}
// Added to provide a unified interface with CanvasRenderingContext2D. Prefer calling forceLostContext instead.
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLRenderbuffer.cpp ('k') | third_party/WebKit/Source/modules/webgl/WebGLSampler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698