summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp')
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index 4d24ea9..b23dc35 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -1001,6 +1001,7 @@ void WebGraphicsContext3DDefaultImpl::generateMipmap(unsigned long target)
bool WebGraphicsContext3DDefaultImpl::getActiveAttrib(WebGLId program, unsigned long index, ActiveInfo& info)
{
+ makeContextCurrent();
if (!program) {
synthesizeGLError(GL_INVALID_VALUE);
return false;
@@ -1032,6 +1033,7 @@ bool WebGraphicsContext3DDefaultImpl::getActiveAttrib(WebGLId program, unsigned
bool WebGraphicsContext3DDefaultImpl::getActiveUniform(WebGLId program, unsigned long index, ActiveInfo& info)
{
+ makeContextCurrent();
GLint maxNameLength = -1;
glGetProgramiv(program, GL_ACTIVE_UNIFORM_MAX_LENGTH, &maxNameLength);
if (maxNameLength < 0)
@@ -1223,6 +1225,7 @@ DELEGATE_TO_GL_2(polygonOffset, PolygonOffset, double, double)
void WebGraphicsContext3DDefaultImpl::readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* pixels)
{
+ makeContextCurrent();
// FIXME: remove the two glFlush calls when the driver bug is fixed, i.e.,
// all previous rendering calls should be done before reading pixels.
glFlush();