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

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

Issue 1387743002: Fixed expando-loss.html test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index 637d008527af4fef675b201885fcd8aec418fc50..b970d0e688c924920be62c46bf06977c016fefa7 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -2051,13 +2051,13 @@ WebGLVertexArrayObject* WebGL2RenderingContextBase::createVertexArray()
return o;
}
-void WebGL2RenderingContextBase::deleteVertexArray(WebGLVertexArrayObject* vertexArray)
+void WebGL2RenderingContextBase::deleteVertexArray(ScriptState* scriptState, WebGLVertexArrayObject* vertexArray)
{
if (isContextLost() || !vertexArray)
return;
if (!vertexArray->isDefaultObject() && vertexArray == m_boundVertexArrayObject)
- setBoundVertexArrayObject(nullptr);
+ setBoundVertexArrayObject(scriptState, nullptr);
vertexArray->deleteObject(webContext());
}
@@ -2073,7 +2073,7 @@ GLboolean WebGL2RenderingContextBase::isVertexArray(WebGLVertexArrayObject* vert
return webContext()->isVertexArrayOES(vertexArray->object());
}
-void WebGL2RenderingContextBase::bindVertexArray(WebGLVertexArrayObject* vertexArray)
+void WebGL2RenderingContextBase::bindVertexArray(ScriptState* scriptState, WebGLVertexArrayObject* vertexArray)
{
if (isContextLost())
return;
@@ -2087,14 +2087,14 @@ void WebGL2RenderingContextBase::bindVertexArray(WebGLVertexArrayObject* vertexA
webContext()->bindVertexArrayOES(objectOrZero(vertexArray));
vertexArray->setHasEverBeenBound();
- setBoundVertexArrayObject(vertexArray);
+ setBoundVertexArrayObject(scriptState, vertexArray);
} else {
webContext()->bindVertexArrayOES(0);
- setBoundVertexArrayObject(nullptr);
+ setBoundVertexArrayObject(scriptState, nullptr);
}
}
-void WebGL2RenderingContextBase::bindFramebuffer(GLenum target, WebGLFramebuffer* buffer)
+void WebGL2RenderingContextBase::bindFramebuffer(ScriptState* scriptState, GLenum target, WebGLFramebuffer* buffer)
{
bool deleted;
if (!checkObjectToBeBound("bindFramebuffer", buffer, deleted))
@@ -2116,6 +2116,8 @@ void WebGL2RenderingContextBase::bindFramebuffer(GLenum target, WebGLFramebuffer
}
setFramebuffer(target, buffer);
+ if (scriptState)
+ preserveObjectWrapper(scriptState, this, "framebuffer", 0, buffer);
}
void WebGL2RenderingContextBase::deleteFramebuffer(WebGLFramebuffer* framebuffer)
@@ -2933,8 +2935,8 @@ void WebGL2RenderingContextBase::removeBoundBuffer(WebGLBuffer* buffer)
void WebGL2RenderingContextBase::restoreCurrentFramebuffer()
{
- bindFramebuffer(GL_DRAW_FRAMEBUFFER, m_framebufferBinding.get());
- bindFramebuffer(GL_READ_FRAMEBUFFER, m_readFramebufferBinding.get());
+ bindFramebuffer(nullptr, GL_DRAW_FRAMEBUFFER, m_framebufferBinding.get());
+ bindFramebuffer(nullptr, GL_READ_FRAMEBUFFER, m_readFramebufferBinding.get());
}
GLenum WebGL2RenderingContextBase::boundFramebufferColorFormat()

Powered by Google App Engine
This is Rietveld 408576698