[webkit-changes] [WebKit/WebKit] 6a55c5: WebGL resource creation is not robust against cont...
Kimmo Kinnunen
noreply at github.com
Wed Aug 23 06:47:04 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6a55c5eda697bbd893e6db2a7e7b899553c9227d
https://github.com/WebKit/WebKit/commit/6a55c5eda697bbd893e6db2a7e7b899553c9227d
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-08-23 (Wed, 23 Aug 2023)
Changed paths:
M Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp
M Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
M Source/WebCore/html/canvas/WebGLBuffer.cpp
M Source/WebCore/html/canvas/WebGLBuffer.h
M Source/WebCore/html/canvas/WebGLFramebuffer.cpp
M Source/WebCore/html/canvas/WebGLFramebuffer.h
M Source/WebCore/html/canvas/WebGLObject.cpp
M Source/WebCore/html/canvas/WebGLObject.h
M Source/WebCore/html/canvas/WebGLProgram.cpp
M Source/WebCore/html/canvas/WebGLProgram.h
M Source/WebCore/html/canvas/WebGLQuery.cpp
M Source/WebCore/html/canvas/WebGLQuery.h
M Source/WebCore/html/canvas/WebGLRenderbuffer.cpp
M Source/WebCore/html/canvas/WebGLRenderbuffer.h
M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
M Source/WebCore/html/canvas/WebGLSampler.cpp
M Source/WebCore/html/canvas/WebGLSampler.h
M Source/WebCore/html/canvas/WebGLShader.cpp
M Source/WebCore/html/canvas/WebGLShader.h
M Source/WebCore/html/canvas/WebGLSync.cpp
M Source/WebCore/html/canvas/WebGLSync.h
M Source/WebCore/html/canvas/WebGLTexture.cpp
M Source/WebCore/html/canvas/WebGLTexture.h
M Source/WebCore/html/canvas/WebGLTimerQueryEXT.cpp
M Source/WebCore/html/canvas/WebGLTimerQueryEXT.h
M Source/WebCore/html/canvas/WebGLTransformFeedback.cpp
M Source/WebCore/html/canvas/WebGLTransformFeedback.h
M Source/WebCore/html/canvas/WebGLVertexArrayObject.cpp
M Source/WebCore/html/canvas/WebGLVertexArrayObject.h
M Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.cpp
M Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.h
M Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.cpp
M Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.h
Log Message:
-----------
WebGL resource creation is not robust against context loss
https://bugs.webkit.org/show_bug.cgi?id=260513
rdar://problem/114245538
Reviewed by Dan Glastonbury.
At the moment, the various GraphicsContextGL::create{Resource}() calls
might return 0 if the context is lost during that call. Handle this in
all the WebGL resource constructors. Return RefPtr and handle the
nullptr in the caller.
* Source/WebCore/Modules/webxr/WebXROpaqueFramebuffer.cpp:
(WebCore::WebXROpaqueFramebuffer::create):
* Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::fenceSync):
* Source/WebCore/html/canvas/WebGLBuffer.cpp:
(WebCore::WebGLBuffer::create):
(WebCore::WebGLBuffer::WebGLBuffer):
* Source/WebCore/html/canvas/WebGLBuffer.h:
* Source/WebCore/html/canvas/WebGLFramebuffer.cpp:
(WebCore::WebGLFramebuffer::create):
(WebCore::WebGLFramebuffer::createOpaque):
(WebCore::WebGLFramebuffer::WebGLFramebuffer):
* Source/WebCore/html/canvas/WebGLFramebuffer.h:
* Source/WebCore/html/canvas/WebGLObject.cpp:
(WebCore::WebGLObject::WebGLObject):
(WebCore::WebGLObject::setObject): Deleted.
* Source/WebCore/html/canvas/WebGLObject.h:
* Source/WebCore/html/canvas/WebGLProgram.cpp:
(WebCore::WebGLProgram::create):
(WebCore::WebGLProgram::WebGLProgram):
* Source/WebCore/html/canvas/WebGLProgram.h:
* Source/WebCore/html/canvas/WebGLQuery.cpp:
(WebCore::WebGLQuery::create):
(WebCore::WebGLQuery::WebGLQuery):
* Source/WebCore/html/canvas/WebGLQuery.h:
* Source/WebCore/html/canvas/WebGLRenderbuffer.cpp:
(WebCore::WebGLRenderbuffer::create):
(WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
* Source/WebCore/html/canvas/WebGLRenderbuffer.h:
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::createProgram):
* Source/WebCore/html/canvas/WebGLSampler.cpp:
(WebCore::WebGLSampler::create):
(WebCore::WebGLSampler::WebGLSampler):
* Source/WebCore/html/canvas/WebGLSampler.h:
* Source/WebCore/html/canvas/WebGLShader.cpp:
(WebCore::WebGLShader::create):
(WebCore::WebGLShader::WebGLShader):
* Source/WebCore/html/canvas/WebGLShader.h:
* Source/WebCore/html/canvas/WebGLSync.cpp:
(WebCore::WebGLSync::create):
(WebCore::WebGLSync::WebGLSync):
(WebCore::m_sync):
(WebCore::WebGLSync::deleteObjectImpl):
* Source/WebCore/html/canvas/WebGLSync.h:
* Source/WebCore/html/canvas/WebGLTexture.cpp:
(WebCore::WebGLTexture::create):
(WebCore::WebGLTexture::WebGLTexture):
* Source/WebCore/html/canvas/WebGLTexture.h:
* Source/WebCore/html/canvas/WebGLTimerQueryEXT.cpp:
(WebCore::WebGLTimerQueryEXT::create):
(WebCore::WebGLTimerQueryEXT::WebGLTimerQueryEXT):
* Source/WebCore/html/canvas/WebGLTimerQueryEXT.h:
* Source/WebCore/html/canvas/WebGLTransformFeedback.cpp:
(WebCore::WebGLTransformFeedback::create):
(WebCore::WebGLTransformFeedback::WebGLTransformFeedback):
* Source/WebCore/html/canvas/WebGLTransformFeedback.h:
* Source/WebCore/html/canvas/WebGLVertexArrayObject.cpp:
(WebCore::WebGLVertexArrayObject::create):
(WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject):
* Source/WebCore/html/canvas/WebGLVertexArrayObject.h:
* Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.cpp:
(WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase):
* Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.h:
* Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.cpp:
(WebCore::WebGLVertexArrayObjectOES::createDefault):
(WebCore::WebGLVertexArrayObjectOES::createUser):
(WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
* Source/WebCore/html/canvas/WebGLVertexArrayObjectOES.h:
Canonical link: https://commits.webkit.org/267183@main
More information about the webkit-changes
mailing list