haikuwebkit/Source/WebCore/html/canvas/WebGLSync.cpp

114 lines
3.5 KiB
C++
Raw Permalink Normal View History

[WebGL2] Create empty interface files for new WebGL2 objects. https://bugs.webkit.org/show_bug.cgi?id=140779. <rdar://problem/15002288> Reviewed by Dean Jackson. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLQuery.cpp: Added. (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: Added. * html/canvas/WebGLQuery.idl: Added. * html/canvas/WebGLSampler.cpp: Added. (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: Added. * html/canvas/WebGLSampler.idl: Added. * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isQuery): (WebCore::WebGLSharedObject::isSampler): (WebCore::WebGLSharedObject::isSync): (WebCore::WebGLSharedObject::isTransformFeedback): (WebCore::WebGLSharedObject::isVertexArrayObject): * html/canvas/WebGLSync.cpp: Added. (WebCore::WebGLSync::create): (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: Added. * html/canvas/WebGLSync.idl: Added. * html/canvas/WebGLTransformFeedback.cpp: Added. (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): * html/canvas/WebGLTransformFeedback.h: Added. * html/canvas/WebGLTransformFeedback.idl: Added. * html/canvas/WebGLVertexArrayObject.cpp: Added. (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: Added. * html/canvas/WebGLVertexArrayObject.idl: Added. * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/158782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-22 23:35:15 +00:00
/*
* Copyright (C) 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#if ENABLE(WEBGL)
#include "WebGLSync.h"
#include "HTMLCanvasElement.h"
[WebGL2] Create empty interface files for new WebGL2 objects. https://bugs.webkit.org/show_bug.cgi?id=140779. <rdar://problem/15002288> Reviewed by Dean Jackson. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLQuery.cpp: Added. (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: Added. * html/canvas/WebGLQuery.idl: Added. * html/canvas/WebGLSampler.cpp: Added. (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: Added. * html/canvas/WebGLSampler.idl: Added. * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isQuery): (WebCore::WebGLSharedObject::isSampler): (WebCore::WebGLSharedObject::isSync): (WebCore::WebGLSharedObject::isTransformFeedback): (WebCore::WebGLSharedObject::isVertexArrayObject): * html/canvas/WebGLSync.cpp: Added. (WebCore::WebGLSync::create): (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: Added. * html/canvas/WebGLSync.idl: Added. * html/canvas/WebGLTransformFeedback.cpp: Added. (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): * html/canvas/WebGLTransformFeedback.h: Added. * html/canvas/WebGLTransformFeedback.idl: Added. * html/canvas/WebGLVertexArrayObject.cpp: Added. (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: Added. * html/canvas/WebGLVertexArrayObject.idl: Added. * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/158782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-22 23:35:15 +00:00
#include "WebGLContextGroup.h"
#include "WebGLRenderingContextBase.h"
[WebGL2] expando-loss and expando-loss-2 conformance tests are failing https://bugs.webkit.org/show_bug.cgi?id=214765 Patch by Kenneth Russell <kbr@chromium.org> on 2020-08-14 Reviewed by Yusuke Suzuki. Re-land with locking fixes ysuzuki@ pointed out as necessary, and advised heavily on. Source/WebCore: Use JSWebGLRenderingContext's and JSWebGL2RenderingContext's existing visitAdditionalChildren hook, via JSCustomMarkFunction in their IDL, to add opaque roots for all WebGLObjects latched in to the context state, and all WebGLObjects they refer to. Extensions were already previously handled. In order to support JSC's concurrent marking, grab a per-WebGL-context lock in visitAdditionalChildren, and in all WebGL context- and object-related methods which modify compound data structures like HashMaps and Vectors that are traversed by visitAdditionalChildren and its callees. Add "const AbstractLocker&" throughout WebGL's call hierarchy to guarantee that this lock is held where needed. Add needed exception in WebGLObjects' destructors to avoid recursive locking, and in WebGLContextGroup destruction to avoid mutating objects that GC might be traversing when a lock is no longer available on the application's thread. Add "GenerateIsReachable=Impl" to the IDL files of needed WebGL objects (WebGLBuffer, WebGLTexture, etc.) so that they pay attention to the opaque root state when determining liveness of their JavaScript wrappers. Add a FIXME to objectGraphLock in WebGLRenderingContextBase to consider rewriting this in a lock-free manner. Covered by existing WebGL conformance tests. * bindings/js/JSWebGL2RenderingContextCustom.cpp: (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren): * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::JSWebGLRenderingContext::visitAdditionalChildren): * html/canvas/OESVertexArrayObject.cpp: (WebCore::OESVertexArrayObject::deleteVertexArrayOES): (WebCore::OESVertexArrayObject::bindVertexArrayOES): * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::validateAndCacheBufferBinding): (WebCore::WebGL2RenderingContext::bindFramebuffer): (WebCore::WebGL2RenderingContext::deleteFramebuffer): (WebCore::WebGL2RenderingContext::deleteQuery): (WebCore::WebGL2RenderingContext::beginQuery): (WebCore::WebGL2RenderingContext::endQuery): (WebCore::WebGL2RenderingContext::deleteSampler): (WebCore::WebGL2RenderingContext::bindSampler): (WebCore::WebGL2RenderingContext::deleteSync): (WebCore::WebGL2RenderingContext::deleteTransformFeedback): (WebCore::WebGL2RenderingContext::bindTransformFeedback): (WebCore::WebGL2RenderingContext::beginTransformFeedback): (WebCore::WebGL2RenderingContext::setIndexedBufferBinding): (WebCore::WebGL2RenderingContext::deleteVertexArray): (WebCore::WebGL2RenderingContext::bindVertexArray): (WebCore::WebGL2RenderingContext::addMembersToOpaqueRoots): (WebCore::WebGL2RenderingContext::uncacheDeletedBuffer): * html/canvas/WebGL2RenderingContext.h: * html/canvas/WebGLBuffer.cpp: (WebCore::WebGLBuffer::~WebGLBuffer): (WebCore::WebGLBuffer::deleteObjectImpl): * html/canvas/WebGLBuffer.h: * html/canvas/WebGLBuffer.idl: * html/canvas/WebGLContextGroup.cpp: (WebCore::WebGLContextGroup::hasAContext const): (WebCore::WebGLContextGroup::objectGraphLockForAContext): (WebCore::WebGLContextGroup::detachAndRemoveAllObjects): * html/canvas/WebGLContextGroup.h: * html/canvas/WebGLContextObject.cpp: (WebCore::WebGLContextObject::detachContext): (WebCore::WebGLContextObject::objectGraphLockForContext): * html/canvas/WebGLContextObject.h: * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::~WebGLFramebuffer): (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer): (WebCore::WebGLFramebuffer::deleteObjectImpl): (WebCore::WebGLFramebuffer::initializeAttachments): (WebCore::WebGLFramebuffer::addMembersToOpaqueRoots): (WebCore::WebGLFramebuffer::setAttachmentInternal): (WebCore::WebGLFramebuffer::removeAttachmentInternal): * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLFramebuffer.idl: * html/canvas/WebGLObject.cpp: (WebCore::WebGLObject::runDestructor): (WebCore::WebGLObject::deleteObject): * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: (WebCore::WebGLProgram::~WebGLProgram): (WebCore::WebGLProgram::deleteObjectImpl): (WebCore::WebGLProgram::attachShader): (WebCore::WebGLProgram::detachShader): (WebCore::WebGLProgram::addMembersToOpaqueRoots): * html/canvas/WebGLProgram.h: * html/canvas/WebGLProgram.idl: * html/canvas/WebGLQuery.cpp: (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: * html/canvas/WebGLQuery.idl: * html/canvas/WebGLRenderbuffer.cpp: (WebCore::WebGLRenderbuffer::~WebGLRenderbuffer): (WebCore::WebGLRenderbuffer::deleteObjectImpl): * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderbuffer.idl: * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::attachShader): (WebCore::WebGLRenderingContextBase::validateAndCacheBufferBinding): (WebCore::WebGLRenderingContextBase::bindBuffer): (WebCore::WebGLRenderingContextBase::bindFramebuffer): (WebCore::WebGLRenderingContextBase::bindRenderbuffer): (WebCore::WebGLRenderingContextBase::bindTexture): (WebCore::WebGLRenderingContextBase::deleteObject): (WebCore::WebGLRenderingContextBase::uncacheDeletedBuffer): (WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject): (WebCore::WebGLRenderingContextBase::deleteBuffer): (WebCore::WebGLRenderingContextBase::deleteFramebuffer): (WebCore::WebGLRenderingContextBase::deleteProgram): (WebCore::WebGLRenderingContextBase::deleteRenderbuffer): (WebCore::WebGLRenderingContextBase::deleteShader): (WebCore::WebGLRenderingContextBase::deleteTexture): (WebCore::WebGLRenderingContextBase::detachShader): (WebCore::WebGLRenderingContextBase::useProgram): (WebCore::WebGLRenderingContextBase::vertexAttribPointer): (WebCore::WebGLRenderingContextBase::detachAndRemoveAllObjects): (WebCore::WebGLRenderingContextBase::setFramebuffer): (WebCore::WebGLRenderingContextBase::addMembersToOpaqueRoots): (WebCore::WebGLRenderingContextBase::objectGraphLock): * html/canvas/WebGLRenderingContextBase.h: (WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject): Deleted. * html/canvas/WebGLSampler.cpp: (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: * html/canvas/WebGLSampler.idl: * html/canvas/WebGLShader.cpp: (WebCore::WebGLShader::~WebGLShader): (WebCore::WebGLShader::deleteObjectImpl): * html/canvas/WebGLShader.h: * html/canvas/WebGLShader.idl: * html/canvas/WebGLSharedObject.cpp: (WebCore::WebGLSharedObject::detachContextGroup): (WebCore::WebGLSharedObject::detachContextGroupWithoutDeletingObject): (WebCore::WebGLSharedObject::hasGroupOrContext const): (WebCore::WebGLSharedObject::objectGraphLockForContext): * html/canvas/WebGLSharedObject.h: * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: * html/canvas/WebGLTexture.cpp: (WebCore::WebGLTexture::~WebGLTexture): (WebCore::WebGLTexture::deleteObjectImpl): * html/canvas/WebGLTexture.h: * html/canvas/WebGLTexture.idl: * html/canvas/WebGLTransformFeedback.cpp: (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): (WebCore::WebGLTransformFeedback::setProgram): (WebCore::WebGLTransformFeedback::setBoundIndexedTransformFeedbackBuffer): (WebCore::WebGLTransformFeedback::addMembersToOpaqueRoots): (WebCore::WebGLTransformFeedback::unbindBuffer): * html/canvas/WebGLTransformFeedback.h: * html/canvas/WebGLTransformFeedback.idl: * html/canvas/WebGLVertexArrayObject.cpp: (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: * html/canvas/WebGLVertexArrayObject.idl: * html/canvas/WebGLVertexArrayObjectBase.cpp: (WebCore::WebGLVertexArrayObjectBase::setElementArrayBuffer): (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState): (WebCore::WebGLVertexArrayObjectBase::unbindBuffer): (WebCore::WebGLVertexArrayObjectBase::addMembersToOpaqueRoots): * html/canvas/WebGLVertexArrayObjectBase.h: * html/canvas/WebGLVertexArrayObjectOES.cpp: (WebCore::WebGLVertexArrayObjectOES::~WebGLVertexArrayObjectOES): (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl): * html/canvas/WebGLVertexArrayObjectOES.h: * html/canvas/WebGLVertexArrayObjectOES.idl: LayoutTests: Rebaseline expando-loss.html and expando-loss-2.html, which are now fully passing. Add a hook to js-test-pre.js which allows these tests to be run correctly in the MiniBrowser by setting the following environment variables: export JSC_useDollarVM=1 export __XPC_JSC_useDollarVM=1 * webgl/2.0.0/conformance/misc/expando-loss-expected.txt: * webgl/2.0.0/conformance2/misc/expando-loss-2-expected.txt: * webgl/2.0.0/resources/webgl_test_files/js/js-test-pre.js: Canonical link: https://commits.webkit.org/228291@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265708 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-14 22:06:42 +00:00
#include <wtf/Lock.h>
#include <wtf/Locker.h>
[WebGL2] Create empty interface files for new WebGL2 objects. https://bugs.webkit.org/show_bug.cgi?id=140779. <rdar://problem/15002288> Reviewed by Dean Jackson. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLQuery.cpp: Added. (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: Added. * html/canvas/WebGLQuery.idl: Added. * html/canvas/WebGLSampler.cpp: Added. (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: Added. * html/canvas/WebGLSampler.idl: Added. * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isQuery): (WebCore::WebGLSharedObject::isSampler): (WebCore::WebGLSharedObject::isSync): (WebCore::WebGLSharedObject::isTransformFeedback): (WebCore::WebGLSharedObject::isVertexArrayObject): * html/canvas/WebGLSync.cpp: Added. (WebCore::WebGLSync::create): (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: Added. * html/canvas/WebGLSync.idl: Added. * html/canvas/WebGLTransformFeedback.cpp: Added. (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): * html/canvas/WebGLTransformFeedback.h: Added. * html/canvas/WebGLTransformFeedback.idl: Added. * html/canvas/WebGLVertexArrayObject.cpp: Added. (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: Added. * html/canvas/WebGLVertexArrayObject.idl: Added. * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/158782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-22 23:35:15 +00:00
namespace WebCore {
[WebGL] Migrate construction functions from pointers to references https://bugs.webkit.org/show_bug.cgi?id=164749 Reviewed by Zalan Bujtas. Mechanical find/replace. No new tests because there is no behavior change. * html/canvas/ANGLEInstancedArrays.cpp: (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays): (WebCore::ANGLEInstancedArrays::supported): (WebCore::ANGLEInstancedArrays::drawArraysInstancedANGLE): (WebCore::ANGLEInstancedArrays::drawElementsInstancedANGLE): (WebCore::ANGLEInstancedArrays::vertexAttribDivisorANGLE): * html/canvas/ANGLEInstancedArrays.h: * html/canvas/EXTBlendMinMax.cpp: (WebCore::EXTBlendMinMax::EXTBlendMinMax): * html/canvas/EXTBlendMinMax.h: * html/canvas/EXTFragDepth.cpp: (WebCore::EXTFragDepth::EXTFragDepth): * html/canvas/EXTFragDepth.h: * html/canvas/EXTShaderTextureLOD.cpp: (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD): * html/canvas/EXTShaderTextureLOD.h: * html/canvas/EXTTextureFilterAnisotropic.cpp: (WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic): * html/canvas/EXTTextureFilterAnisotropic.h: * html/canvas/EXTsRGB.cpp: (WebCore::EXTsRGB::EXTsRGB): * html/canvas/EXTsRGB.h: * html/canvas/OESElementIndexUint.cpp: (WebCore::OESElementIndexUint::OESElementIndexUint): * html/canvas/OESElementIndexUint.h: * html/canvas/OESStandardDerivatives.cpp: (WebCore::OESStandardDerivatives::OESStandardDerivatives): * html/canvas/OESStandardDerivatives.h: * html/canvas/OESTextureFloat.cpp: (WebCore::OESTextureFloat::OESTextureFloat): * html/canvas/OESTextureFloat.h: * html/canvas/OESTextureFloatLinear.cpp: (WebCore::OESTextureFloatLinear::OESTextureFloatLinear): * html/canvas/OESTextureFloatLinear.h: * html/canvas/OESTextureHalfFloat.cpp: (WebCore::OESTextureHalfFloat::OESTextureHalfFloat): * html/canvas/OESTextureHalfFloat.h: * html/canvas/OESTextureHalfFloatLinear.cpp: (WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear): * html/canvas/OESTextureHalfFloatLinear.h: * html/canvas/OESVertexArrayObject.cpp: (WebCore::OESVertexArrayObject::OESVertexArrayObject): (WebCore::OESVertexArrayObject::createVertexArrayOES): (WebCore::OESVertexArrayObject::deleteVertexArrayOES): (WebCore::OESVertexArrayObject::isVertexArrayOES): (WebCore::OESVertexArrayObject::bindVertexArrayOES): * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects): (WebCore::WebGL2RenderingContext::initializeShaderExtensions): (WebCore::WebGL2RenderingContext::drawBuffers): (WebCore::WebGL2RenderingContext::createVertexArray): (WebCore::WebGL2RenderingContext::isVertexArray): (WebCore::WebGL2RenderingContext::bindVertexArray): (WebCore::WebGL2RenderingContext::getExtension): (WebCore::WebGL2RenderingContext::getSupportedExtensions): * html/canvas/WebGLBuffer.cpp: (WebCore::WebGLBuffer::create): (WebCore::WebGLBuffer::WebGLBuffer): * html/canvas/WebGLBuffer.h: * html/canvas/WebGLCompressedTextureATC.cpp: (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC): (WebCore::WebGLCompressedTextureATC::supported): * html/canvas/WebGLCompressedTextureATC.h: * html/canvas/WebGLCompressedTexturePVRTC.cpp: (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC): (WebCore::WebGLCompressedTexturePVRTC::supported): * html/canvas/WebGLCompressedTexturePVRTC.h: * html/canvas/WebGLCompressedTextureS3TC.cpp: (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC): (WebCore::WebGLCompressedTextureS3TC::supported): * html/canvas/WebGLCompressedTextureS3TC.h: * html/canvas/WebGLContextObject.cpp: (WebCore::WebGLContextObject::WebGLContextObject): * html/canvas/WebGLContextObject.h: * html/canvas/WebGLDebugRendererInfo.cpp: (WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo): * html/canvas/WebGLDebugRendererInfo.h: * html/canvas/WebGLDebugShaders.cpp: (WebCore::WebGLDebugShaders::WebGLDebugShaders): (WebCore::WebGLDebugShaders::getTranslatedShaderSource): * html/canvas/WebGLDebugShaders.h: * html/canvas/WebGLDepthTexture.cpp: (WebCore::WebGLDepthTexture::WebGLDepthTexture): (WebCore::WebGLDepthTexture::supported): * html/canvas/WebGLDepthTexture.h: * html/canvas/WebGLDrawBuffers.cpp: (WebCore::WebGLDrawBuffers::WebGLDrawBuffers): (WebCore::WebGLDrawBuffers::supported): (WebCore::WebGLDrawBuffers::drawBuffersWEBGL): (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements): * html/canvas/WebGLDrawBuffers.h: * html/canvas/WebGLExtension.cpp: (WebCore::WebGLExtension::WebGLExtension): * html/canvas/WebGLExtension.h: (WebCore::WebGLExtension::ref): (WebCore::WebGLExtension::deref): (WebCore::WebGLExtension::context): * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::create): (WebCore::WebGLFramebuffer::WebGLFramebuffer): (WebCore::WebGLFramebuffer::drawBuffersIfNecessary): * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLLoseContext.cpp: (WebCore::WebGLLoseContext::WebGLLoseContext): (WebCore::WebGLLoseContext::loseContext): (WebCore::WebGLLoseContext::restoreContext): * html/canvas/WebGLLoseContext.h: * html/canvas/WebGLObject.cpp: (WebCore::WebGLObject::WebGLObject): * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: (WebCore::WebGLProgram::create): (WebCore::WebGLProgram::WebGLProgram): * html/canvas/WebGLProgram.h: * html/canvas/WebGLQuery.cpp: (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::WebGLQuery): * html/canvas/WebGLQuery.h: * html/canvas/WebGLRenderbuffer.cpp: (WebCore::WebGLRenderbuffer::create): (WebCore::WebGLRenderbuffer::WebGLRenderbuffer): * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::initializeVertexArrayObjects): (WebCore::WebGLRenderingContext::getExtension): (WebCore::WebGLRenderingContext::getSupportedExtensions): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::create): (WebCore::WebGLRenderingContextBase::setupFlags): (WebCore::WebGLRenderingContextBase::checkObjectToBeBound): (WebCore::WebGLRenderingContextBase::createBuffer): (WebCore::WebGLRenderingContextBase::createFramebuffer): (WebCore::WebGLRenderingContextBase::createTexture): (WebCore::WebGLRenderingContextBase::createProgram): (WebCore::WebGLRenderingContextBase::createRenderbuffer): (WebCore::WebGLRenderingContextBase::createShader): (WebCore::WebGLRenderingContextBase::deleteObject): (WebCore::WebGLRenderingContextBase::validateWebGLObject): (WebCore::WebGLRenderingContextBase::framebufferRenderbuffer): (WebCore::WebGLRenderingContextBase::framebufferTexture2D): (WebCore::WebGLRenderingContextBase::getUniform): (WebCore::WebGLRenderingContextBase::readPixels): (WebCore::WebGLRenderingContextBase::loseContextImpl): (WebCore::WebGLRenderingContextBase::maybeRestoreContext): (WebCore::WebGLRenderingContextBase::supportsDrawBuffers): * html/canvas/WebGLSampler.cpp: (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::WebGLSampler): * html/canvas/WebGLSampler.h: * html/canvas/WebGLShader.cpp: (WebCore::WebGLShader::create): (WebCore::WebGLShader::WebGLShader): * html/canvas/WebGLShader.h: * html/canvas/WebGLSharedObject.cpp: (WebCore::WebGLSharedObject::WebGLSharedObject): * html/canvas/WebGLSharedObject.h: * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::create): (WebCore::WebGLSync::WebGLSync): * html/canvas/WebGLSync.h: * html/canvas/WebGLTexture.cpp: (WebCore::WebGLTexture::create): (WebCore::WebGLTexture::WebGLTexture): * html/canvas/WebGLTexture.h: * html/canvas/WebGLTransformFeedback.cpp: (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): * html/canvas/WebGLTransformFeedback.h: * html/canvas/WebGLVertexArrayObject.cpp: (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): * html/canvas/WebGLVertexArrayObject.h: * html/canvas/WebGLVertexArrayObjectBase.cpp: (WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase): * html/canvas/WebGLVertexArrayObjectBase.h: * html/canvas/WebGLVertexArrayObjectOES.cpp: (WebCore::WebGLVertexArrayObjectOES::create): (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES): (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl): * html/canvas/WebGLVertexArrayObjectOES.h: * platform/graphics/GraphicsContext3D.h: * platform/graphics/gpu/Texture.cpp: (WebCore::convertFormat): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): (WebCore::GraphicsContext3D::reshapeFBOs): (WebCore::GraphicsContext3D::getIntegerv): (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::validateDepthStencil): (WebCore::GraphicsContext3D::drawArraysInstanced): (WebCore::GraphicsContext3D::drawElementsInstanced): (WebCore::GraphicsContext3D::vertexAttribDivisor): Canonical link: https://commits.webkit.org/182454@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-15 19:42:04 +00:00
Ref<WebGLSync> WebGLSync::create(WebGLRenderingContextBase& ctx)
[WebGL2] Create empty interface files for new WebGL2 objects. https://bugs.webkit.org/show_bug.cgi?id=140779. <rdar://problem/15002288> Reviewed by Dean Jackson. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLQuery.cpp: Added. (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: Added. * html/canvas/WebGLQuery.idl: Added. * html/canvas/WebGLSampler.cpp: Added. (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: Added. * html/canvas/WebGLSampler.idl: Added. * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isQuery): (WebCore::WebGLSharedObject::isSampler): (WebCore::WebGLSharedObject::isSync): (WebCore::WebGLSharedObject::isTransformFeedback): (WebCore::WebGLSharedObject::isVertexArrayObject): * html/canvas/WebGLSync.cpp: Added. (WebCore::WebGLSync::create): (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: Added. * html/canvas/WebGLSync.idl: Added. * html/canvas/WebGLTransformFeedback.cpp: Added. (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): * html/canvas/WebGLTransformFeedback.h: Added. * html/canvas/WebGLTransformFeedback.idl: Added. * html/canvas/WebGLVertexArrayObject.cpp: Added. (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: Added. * html/canvas/WebGLVertexArrayObject.idl: Added. * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/158782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-22 23:35:15 +00:00
{
Purge PassRefPtr create() factory functions in html https://bugs.webkit.org/show_bug.cgi?id=144522 Patch by Gyuyoung Kim <gyuyoung.kim@samsung.com> on 2015-05-02 Reviewed by Darin Adler. Return Ref instead of PassRefPtr in create() factory functions in html, because the factory can't return null. This patch is a first step to purge in html. Following patch is going to be uploaded. No new tests, no behavior changes. * html/FileInputType.cpp: (WebCore::UploadButtonElement::create): (WebCore::UploadButtonElement::createForMultiple): * html/MediaController.cpp: (MediaController::create): * html/MediaController.h: * html/canvas/WebGLBuffer.cpp: (WebCore::WebGLBuffer::create): * html/canvas/WebGLBuffer.h: * html/canvas/WebGLContextAttributes.cpp: (WebCore::WebGLContextAttributes::create): * html/canvas/WebGLContextAttributes.h: * html/canvas/WebGLContextGroup.cpp: (WebCore::WebGLContextGroup::create): * html/canvas/WebGLContextGroup.h: * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::create): * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLProgram.cpp: (WebCore::WebGLProgram::create): * html/canvas/WebGLProgram.h: * html/canvas/WebGLQuery.cpp: (WebCore::WebGLQuery::create): * html/canvas/WebGLQuery.h: * html/canvas/WebGLRenderbuffer.cpp: (WebCore::WebGLRenderbuffer::create): * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLSampler.cpp: (WebCore::WebGLSampler::create): * html/canvas/WebGLSampler.h: * html/canvas/WebGLShader.cpp: (WebCore::WebGLShader::create): * html/canvas/WebGLShader.h: * html/canvas/WebGLShaderPrecisionFormat.cpp: (WebCore::WebGLShaderPrecisionFormat::create): * html/canvas/WebGLShaderPrecisionFormat.h: * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::create): * html/canvas/WebGLSync.h: * html/canvas/WebGLTexture.cpp: (WebCore::WebGLTexture::create): * html/canvas/WebGLTexture.h: * html/canvas/WebGLTransformFeedback.cpp: (WebCore::WebGLTransformFeedback::create): * html/canvas/WebGLTransformFeedback.h: * html/canvas/WebGLUniformLocation.cpp: (WebCore::WebGLUniformLocation::create): * html/canvas/WebGLUniformLocation.h: * html/canvas/WebGLVertexArrayObject.cpp: (WebCore::WebGLVertexArrayObject::create): * html/canvas/WebGLVertexArrayObject.h: * html/canvas/WebGLVertexArrayObjectOES.cpp: (WebCore::WebGLVertexArrayObjectOES::create): * html/canvas/WebGLVertexArrayObjectOES.h: Canonical link: https://commits.webkit.org/162561@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183726 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-05-03 02:20:17 +00:00
return adoptRef(*new WebGLSync(ctx));
[WebGL2] Create empty interface files for new WebGL2 objects. https://bugs.webkit.org/show_bug.cgi?id=140779. <rdar://problem/15002288> Reviewed by Dean Jackson. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLQuery.cpp: Added. (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: Added. * html/canvas/WebGLQuery.idl: Added. * html/canvas/WebGLSampler.cpp: Added. (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: Added. * html/canvas/WebGLSampler.idl: Added. * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isQuery): (WebCore::WebGLSharedObject::isSampler): (WebCore::WebGLSharedObject::isSync): (WebCore::WebGLSharedObject::isTransformFeedback): (WebCore::WebGLSharedObject::isVertexArrayObject): * html/canvas/WebGLSync.cpp: Added. (WebCore::WebGLSync::create): (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: Added. * html/canvas/WebGLSync.idl: Added. * html/canvas/WebGLTransformFeedback.cpp: Added. (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): * html/canvas/WebGLTransformFeedback.h: Added. * html/canvas/WebGLTransformFeedback.idl: Added. * html/canvas/WebGLVertexArrayObject.cpp: Added. (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: Added. * html/canvas/WebGLVertexArrayObject.idl: Added. * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/158782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-22 23:35:15 +00:00
}
WebGLSync::~WebGLSync()
{
[WebGL2] expando-loss and expando-loss-2 conformance tests are failing https://bugs.webkit.org/show_bug.cgi?id=214765 Patch by Kenneth Russell <kbr@chromium.org> on 2020-08-14 Reviewed by Yusuke Suzuki. Re-land with locking fixes ysuzuki@ pointed out as necessary, and advised heavily on. Source/WebCore: Use JSWebGLRenderingContext's and JSWebGL2RenderingContext's existing visitAdditionalChildren hook, via JSCustomMarkFunction in their IDL, to add opaque roots for all WebGLObjects latched in to the context state, and all WebGLObjects they refer to. Extensions were already previously handled. In order to support JSC's concurrent marking, grab a per-WebGL-context lock in visitAdditionalChildren, and in all WebGL context- and object-related methods which modify compound data structures like HashMaps and Vectors that are traversed by visitAdditionalChildren and its callees. Add "const AbstractLocker&" throughout WebGL's call hierarchy to guarantee that this lock is held where needed. Add needed exception in WebGLObjects' destructors to avoid recursive locking, and in WebGLContextGroup destruction to avoid mutating objects that GC might be traversing when a lock is no longer available on the application's thread. Add "GenerateIsReachable=Impl" to the IDL files of needed WebGL objects (WebGLBuffer, WebGLTexture, etc.) so that they pay attention to the opaque root state when determining liveness of their JavaScript wrappers. Add a FIXME to objectGraphLock in WebGLRenderingContextBase to consider rewriting this in a lock-free manner. Covered by existing WebGL conformance tests. * bindings/js/JSWebGL2RenderingContextCustom.cpp: (WebCore::JSWebGL2RenderingContext::visitAdditionalChildren): * bindings/js/JSWebGLRenderingContextCustom.cpp: (WebCore::JSWebGLRenderingContext::visitAdditionalChildren): * html/canvas/OESVertexArrayObject.cpp: (WebCore::OESVertexArrayObject::deleteVertexArrayOES): (WebCore::OESVertexArrayObject::bindVertexArrayOES): * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::validateAndCacheBufferBinding): (WebCore::WebGL2RenderingContext::bindFramebuffer): (WebCore::WebGL2RenderingContext::deleteFramebuffer): (WebCore::WebGL2RenderingContext::deleteQuery): (WebCore::WebGL2RenderingContext::beginQuery): (WebCore::WebGL2RenderingContext::endQuery): (WebCore::WebGL2RenderingContext::deleteSampler): (WebCore::WebGL2RenderingContext::bindSampler): (WebCore::WebGL2RenderingContext::deleteSync): (WebCore::WebGL2RenderingContext::deleteTransformFeedback): (WebCore::WebGL2RenderingContext::bindTransformFeedback): (WebCore::WebGL2RenderingContext::beginTransformFeedback): (WebCore::WebGL2RenderingContext::setIndexedBufferBinding): (WebCore::WebGL2RenderingContext::deleteVertexArray): (WebCore::WebGL2RenderingContext::bindVertexArray): (WebCore::WebGL2RenderingContext::addMembersToOpaqueRoots): (WebCore::WebGL2RenderingContext::uncacheDeletedBuffer): * html/canvas/WebGL2RenderingContext.h: * html/canvas/WebGLBuffer.cpp: (WebCore::WebGLBuffer::~WebGLBuffer): (WebCore::WebGLBuffer::deleteObjectImpl): * html/canvas/WebGLBuffer.h: * html/canvas/WebGLBuffer.idl: * html/canvas/WebGLContextGroup.cpp: (WebCore::WebGLContextGroup::hasAContext const): (WebCore::WebGLContextGroup::objectGraphLockForAContext): (WebCore::WebGLContextGroup::detachAndRemoveAllObjects): * html/canvas/WebGLContextGroup.h: * html/canvas/WebGLContextObject.cpp: (WebCore::WebGLContextObject::detachContext): (WebCore::WebGLContextObject::objectGraphLockForContext): * html/canvas/WebGLContextObject.h: * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::~WebGLFramebuffer): (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer): (WebCore::WebGLFramebuffer::deleteObjectImpl): (WebCore::WebGLFramebuffer::initializeAttachments): (WebCore::WebGLFramebuffer::addMembersToOpaqueRoots): (WebCore::WebGLFramebuffer::setAttachmentInternal): (WebCore::WebGLFramebuffer::removeAttachmentInternal): * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLFramebuffer.idl: * html/canvas/WebGLObject.cpp: (WebCore::WebGLObject::runDestructor): (WebCore::WebGLObject::deleteObject): * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: (WebCore::WebGLProgram::~WebGLProgram): (WebCore::WebGLProgram::deleteObjectImpl): (WebCore::WebGLProgram::attachShader): (WebCore::WebGLProgram::detachShader): (WebCore::WebGLProgram::addMembersToOpaqueRoots): * html/canvas/WebGLProgram.h: * html/canvas/WebGLProgram.idl: * html/canvas/WebGLQuery.cpp: (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: * html/canvas/WebGLQuery.idl: * html/canvas/WebGLRenderbuffer.cpp: (WebCore::WebGLRenderbuffer::~WebGLRenderbuffer): (WebCore::WebGLRenderbuffer::deleteObjectImpl): * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderbuffer.idl: * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::attachShader): (WebCore::WebGLRenderingContextBase::validateAndCacheBufferBinding): (WebCore::WebGLRenderingContextBase::bindBuffer): (WebCore::WebGLRenderingContextBase::bindFramebuffer): (WebCore::WebGLRenderingContextBase::bindRenderbuffer): (WebCore::WebGLRenderingContextBase::bindTexture): (WebCore::WebGLRenderingContextBase::deleteObject): (WebCore::WebGLRenderingContextBase::uncacheDeletedBuffer): (WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject): (WebCore::WebGLRenderingContextBase::deleteBuffer): (WebCore::WebGLRenderingContextBase::deleteFramebuffer): (WebCore::WebGLRenderingContextBase::deleteProgram): (WebCore::WebGLRenderingContextBase::deleteRenderbuffer): (WebCore::WebGLRenderingContextBase::deleteShader): (WebCore::WebGLRenderingContextBase::deleteTexture): (WebCore::WebGLRenderingContextBase::detachShader): (WebCore::WebGLRenderingContextBase::useProgram): (WebCore::WebGLRenderingContextBase::vertexAttribPointer): (WebCore::WebGLRenderingContextBase::detachAndRemoveAllObjects): (WebCore::WebGLRenderingContextBase::setFramebuffer): (WebCore::WebGLRenderingContextBase::addMembersToOpaqueRoots): (WebCore::WebGLRenderingContextBase::objectGraphLock): * html/canvas/WebGLRenderingContextBase.h: (WebCore::WebGLRenderingContextBase::setBoundVertexArrayObject): Deleted. * html/canvas/WebGLSampler.cpp: (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: * html/canvas/WebGLSampler.idl: * html/canvas/WebGLShader.cpp: (WebCore::WebGLShader::~WebGLShader): (WebCore::WebGLShader::deleteObjectImpl): * html/canvas/WebGLShader.h: * html/canvas/WebGLShader.idl: * html/canvas/WebGLSharedObject.cpp: (WebCore::WebGLSharedObject::detachContextGroup): (WebCore::WebGLSharedObject::detachContextGroupWithoutDeletingObject): (WebCore::WebGLSharedObject::hasGroupOrContext const): (WebCore::WebGLSharedObject::objectGraphLockForContext): * html/canvas/WebGLSharedObject.h: * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: * html/canvas/WebGLTexture.cpp: (WebCore::WebGLTexture::~WebGLTexture): (WebCore::WebGLTexture::deleteObjectImpl): * html/canvas/WebGLTexture.h: * html/canvas/WebGLTexture.idl: * html/canvas/WebGLTransformFeedback.cpp: (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): (WebCore::WebGLTransformFeedback::setProgram): (WebCore::WebGLTransformFeedback::setBoundIndexedTransformFeedbackBuffer): (WebCore::WebGLTransformFeedback::addMembersToOpaqueRoots): (WebCore::WebGLTransformFeedback::unbindBuffer): * html/canvas/WebGLTransformFeedback.h: * html/canvas/WebGLTransformFeedback.idl: * html/canvas/WebGLVertexArrayObject.cpp: (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: * html/canvas/WebGLVertexArrayObject.idl: * html/canvas/WebGLVertexArrayObjectBase.cpp: (WebCore::WebGLVertexArrayObjectBase::setElementArrayBuffer): (WebCore::WebGLVertexArrayObjectBase::setVertexAttribState): (WebCore::WebGLVertexArrayObjectBase::unbindBuffer): (WebCore::WebGLVertexArrayObjectBase::addMembersToOpaqueRoots): * html/canvas/WebGLVertexArrayObjectBase.h: * html/canvas/WebGLVertexArrayObjectOES.cpp: (WebCore::WebGLVertexArrayObjectOES::~WebGLVertexArrayObjectOES): (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl): * html/canvas/WebGLVertexArrayObjectOES.h: * html/canvas/WebGLVertexArrayObjectOES.idl: LayoutTests: Rebaseline expando-loss.html and expando-loss-2.html, which are now fully passing. Add a hook to js-test-pre.js which allows these tests to be run correctly in the MiniBrowser by setting the following environment variables: export JSC_useDollarVM=1 export __XPC_JSC_useDollarVM=1 * webgl/2.0.0/conformance/misc/expando-loss-expected.txt: * webgl/2.0.0/conformance2/misc/expando-loss-2-expected.txt: * webgl/2.0.0/resources/webgl_test_files/js/js-test-pre.js: Canonical link: https://commits.webkit.org/228291@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@265708 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-08-14 22:06:42 +00:00
if (!hasGroupOrContext())
return;
runDestructor();
[WebGL2] Create empty interface files for new WebGL2 objects. https://bugs.webkit.org/show_bug.cgi?id=140779. <rdar://problem/15002288> Reviewed by Dean Jackson. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLQuery.cpp: Added. (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: Added. * html/canvas/WebGLQuery.idl: Added. * html/canvas/WebGLSampler.cpp: Added. (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: Added. * html/canvas/WebGLSampler.idl: Added. * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isQuery): (WebCore::WebGLSharedObject::isSampler): (WebCore::WebGLSharedObject::isSync): (WebCore::WebGLSharedObject::isTransformFeedback): (WebCore::WebGLSharedObject::isVertexArrayObject): * html/canvas/WebGLSync.cpp: Added. (WebCore::WebGLSync::create): (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: Added. * html/canvas/WebGLSync.idl: Added. * html/canvas/WebGLTransformFeedback.cpp: Added. (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): * html/canvas/WebGLTransformFeedback.h: Added. * html/canvas/WebGLTransformFeedback.idl: Added. * html/canvas/WebGLVertexArrayObject.cpp: Added. (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: Added. * html/canvas/WebGLVertexArrayObject.idl: Added. * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/158782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-22 23:35:15 +00:00
}
[WebGL] Migrate construction functions from pointers to references https://bugs.webkit.org/show_bug.cgi?id=164749 Reviewed by Zalan Bujtas. Mechanical find/replace. No new tests because there is no behavior change. * html/canvas/ANGLEInstancedArrays.cpp: (WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays): (WebCore::ANGLEInstancedArrays::supported): (WebCore::ANGLEInstancedArrays::drawArraysInstancedANGLE): (WebCore::ANGLEInstancedArrays::drawElementsInstancedANGLE): (WebCore::ANGLEInstancedArrays::vertexAttribDivisorANGLE): * html/canvas/ANGLEInstancedArrays.h: * html/canvas/EXTBlendMinMax.cpp: (WebCore::EXTBlendMinMax::EXTBlendMinMax): * html/canvas/EXTBlendMinMax.h: * html/canvas/EXTFragDepth.cpp: (WebCore::EXTFragDepth::EXTFragDepth): * html/canvas/EXTFragDepth.h: * html/canvas/EXTShaderTextureLOD.cpp: (WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD): * html/canvas/EXTShaderTextureLOD.h: * html/canvas/EXTTextureFilterAnisotropic.cpp: (WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic): * html/canvas/EXTTextureFilterAnisotropic.h: * html/canvas/EXTsRGB.cpp: (WebCore::EXTsRGB::EXTsRGB): * html/canvas/EXTsRGB.h: * html/canvas/OESElementIndexUint.cpp: (WebCore::OESElementIndexUint::OESElementIndexUint): * html/canvas/OESElementIndexUint.h: * html/canvas/OESStandardDerivatives.cpp: (WebCore::OESStandardDerivatives::OESStandardDerivatives): * html/canvas/OESStandardDerivatives.h: * html/canvas/OESTextureFloat.cpp: (WebCore::OESTextureFloat::OESTextureFloat): * html/canvas/OESTextureFloat.h: * html/canvas/OESTextureFloatLinear.cpp: (WebCore::OESTextureFloatLinear::OESTextureFloatLinear): * html/canvas/OESTextureFloatLinear.h: * html/canvas/OESTextureHalfFloat.cpp: (WebCore::OESTextureHalfFloat::OESTextureHalfFloat): * html/canvas/OESTextureHalfFloat.h: * html/canvas/OESTextureHalfFloatLinear.cpp: (WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear): * html/canvas/OESTextureHalfFloatLinear.h: * html/canvas/OESVertexArrayObject.cpp: (WebCore::OESVertexArrayObject::OESVertexArrayObject): (WebCore::OESVertexArrayObject::createVertexArrayOES): (WebCore::OESVertexArrayObject::deleteVertexArrayOES): (WebCore::OESVertexArrayObject::isVertexArrayOES): (WebCore::OESVertexArrayObject::bindVertexArrayOES): * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects): (WebCore::WebGL2RenderingContext::initializeShaderExtensions): (WebCore::WebGL2RenderingContext::drawBuffers): (WebCore::WebGL2RenderingContext::createVertexArray): (WebCore::WebGL2RenderingContext::isVertexArray): (WebCore::WebGL2RenderingContext::bindVertexArray): (WebCore::WebGL2RenderingContext::getExtension): (WebCore::WebGL2RenderingContext::getSupportedExtensions): * html/canvas/WebGLBuffer.cpp: (WebCore::WebGLBuffer::create): (WebCore::WebGLBuffer::WebGLBuffer): * html/canvas/WebGLBuffer.h: * html/canvas/WebGLCompressedTextureATC.cpp: (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC): (WebCore::WebGLCompressedTextureATC::supported): * html/canvas/WebGLCompressedTextureATC.h: * html/canvas/WebGLCompressedTexturePVRTC.cpp: (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC): (WebCore::WebGLCompressedTexturePVRTC::supported): * html/canvas/WebGLCompressedTexturePVRTC.h: * html/canvas/WebGLCompressedTextureS3TC.cpp: (WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC): (WebCore::WebGLCompressedTextureS3TC::supported): * html/canvas/WebGLCompressedTextureS3TC.h: * html/canvas/WebGLContextObject.cpp: (WebCore::WebGLContextObject::WebGLContextObject): * html/canvas/WebGLContextObject.h: * html/canvas/WebGLDebugRendererInfo.cpp: (WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo): * html/canvas/WebGLDebugRendererInfo.h: * html/canvas/WebGLDebugShaders.cpp: (WebCore::WebGLDebugShaders::WebGLDebugShaders): (WebCore::WebGLDebugShaders::getTranslatedShaderSource): * html/canvas/WebGLDebugShaders.h: * html/canvas/WebGLDepthTexture.cpp: (WebCore::WebGLDepthTexture::WebGLDepthTexture): (WebCore::WebGLDepthTexture::supported): * html/canvas/WebGLDepthTexture.h: * html/canvas/WebGLDrawBuffers.cpp: (WebCore::WebGLDrawBuffers::WebGLDrawBuffers): (WebCore::WebGLDrawBuffers::supported): (WebCore::WebGLDrawBuffers::drawBuffersWEBGL): (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements): * html/canvas/WebGLDrawBuffers.h: * html/canvas/WebGLExtension.cpp: (WebCore::WebGLExtension::WebGLExtension): * html/canvas/WebGLExtension.h: (WebCore::WebGLExtension::ref): (WebCore::WebGLExtension::deref): (WebCore::WebGLExtension::context): * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::create): (WebCore::WebGLFramebuffer::WebGLFramebuffer): (WebCore::WebGLFramebuffer::drawBuffersIfNecessary): * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLLoseContext.cpp: (WebCore::WebGLLoseContext::WebGLLoseContext): (WebCore::WebGLLoseContext::loseContext): (WebCore::WebGLLoseContext::restoreContext): * html/canvas/WebGLLoseContext.h: * html/canvas/WebGLObject.cpp: (WebCore::WebGLObject::WebGLObject): * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: (WebCore::WebGLProgram::create): (WebCore::WebGLProgram::WebGLProgram): * html/canvas/WebGLProgram.h: * html/canvas/WebGLQuery.cpp: (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::WebGLQuery): * html/canvas/WebGLQuery.h: * html/canvas/WebGLRenderbuffer.cpp: (WebCore::WebGLRenderbuffer::create): (WebCore::WebGLRenderbuffer::WebGLRenderbuffer): * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::initializeVertexArrayObjects): (WebCore::WebGLRenderingContext::getExtension): (WebCore::WebGLRenderingContext::getSupportedExtensions): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::create): (WebCore::WebGLRenderingContextBase::setupFlags): (WebCore::WebGLRenderingContextBase::checkObjectToBeBound): (WebCore::WebGLRenderingContextBase::createBuffer): (WebCore::WebGLRenderingContextBase::createFramebuffer): (WebCore::WebGLRenderingContextBase::createTexture): (WebCore::WebGLRenderingContextBase::createProgram): (WebCore::WebGLRenderingContextBase::createRenderbuffer): (WebCore::WebGLRenderingContextBase::createShader): (WebCore::WebGLRenderingContextBase::deleteObject): (WebCore::WebGLRenderingContextBase::validateWebGLObject): (WebCore::WebGLRenderingContextBase::framebufferRenderbuffer): (WebCore::WebGLRenderingContextBase::framebufferTexture2D): (WebCore::WebGLRenderingContextBase::getUniform): (WebCore::WebGLRenderingContextBase::readPixels): (WebCore::WebGLRenderingContextBase::loseContextImpl): (WebCore::WebGLRenderingContextBase::maybeRestoreContext): (WebCore::WebGLRenderingContextBase::supportsDrawBuffers): * html/canvas/WebGLSampler.cpp: (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::WebGLSampler): * html/canvas/WebGLSampler.h: * html/canvas/WebGLShader.cpp: (WebCore::WebGLShader::create): (WebCore::WebGLShader::WebGLShader): * html/canvas/WebGLShader.h: * html/canvas/WebGLSharedObject.cpp: (WebCore::WebGLSharedObject::WebGLSharedObject): * html/canvas/WebGLSharedObject.h: * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::create): (WebCore::WebGLSync::WebGLSync): * html/canvas/WebGLSync.h: * html/canvas/WebGLTexture.cpp: (WebCore::WebGLTexture::create): (WebCore::WebGLTexture::WebGLTexture): * html/canvas/WebGLTexture.h: * html/canvas/WebGLTransformFeedback.cpp: (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): * html/canvas/WebGLTransformFeedback.h: * html/canvas/WebGLVertexArrayObject.cpp: (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): * html/canvas/WebGLVertexArrayObject.h: * html/canvas/WebGLVertexArrayObjectBase.cpp: (WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase): * html/canvas/WebGLVertexArrayObjectBase.h: * html/canvas/WebGLVertexArrayObjectOES.cpp: (WebCore::WebGLVertexArrayObjectOES::create): (WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES): (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl): * html/canvas/WebGLVertexArrayObjectOES.h: * platform/graphics/GraphicsContext3D.h: * platform/graphics/gpu/Texture.cpp: (WebCore::convertFormat): * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp: (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary): (WebCore::GraphicsContext3D::reshapeFBOs): (WebCore::GraphicsContext3D::getIntegerv): (WebCore::GraphicsContext3D::getExtensions): * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: (WebCore::GraphicsContext3D::validateDepthStencil): (WebCore::GraphicsContext3D::drawArraysInstanced): (WebCore::GraphicsContext3D::drawElementsInstanced): (WebCore::GraphicsContext3D::vertexAttribDivisor): Canonical link: https://commits.webkit.org/182454@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-11-15 19:42:04 +00:00
WebGLSync::WebGLSync(WebGLRenderingContextBase& ctx)
[WebGL2] Create empty interface files for new WebGL2 objects. https://bugs.webkit.org/show_bug.cgi?id=140779. <rdar://problem/15002288> Reviewed by Dean Jackson. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLQuery.cpp: Added. (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: Added. * html/canvas/WebGLQuery.idl: Added. * html/canvas/WebGLSampler.cpp: Added. (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: Added. * html/canvas/WebGLSampler.idl: Added. * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isQuery): (WebCore::WebGLSharedObject::isSampler): (WebCore::WebGLSharedObject::isSync): (WebCore::WebGLSharedObject::isTransformFeedback): (WebCore::WebGLSharedObject::isVertexArrayObject): * html/canvas/WebGLSync.cpp: Added. (WebCore::WebGLSync::create): (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: Added. * html/canvas/WebGLSync.idl: Added. * html/canvas/WebGLTransformFeedback.cpp: Added. (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): * html/canvas/WebGLTransformFeedback.h: Added. * html/canvas/WebGLTransformFeedback.idl: Added. * html/canvas/WebGLVertexArrayObject.cpp: Added. (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: Added. * html/canvas/WebGLVertexArrayObject.idl: Added. * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/158782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-22 23:35:15 +00:00
: WebGLSharedObject(ctx)
[WebGL2] Sync objects https://bugs.webkit.org/show_bug.cgi?id=126942 Patch by James Darpinian <jdarpinian@chromium.org> on 2020-07-17 Reviewed by Dean Jackson. Source/WebCore: Passes WebGL conformance tests webgl/2.0.0/conformance2/sync/sync-webgl-specific.html and webgl/2.0.0/deqp/functional/gles3/sync.html although the latter times out in the layout test harness. * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::fenceSync): (WebCore::WebGL2RenderingContext::isSync): (WebCore::WebGL2RenderingContext::deleteSync): (WebCore::WebGL2RenderingContext::clientWaitSync): (WebCore::WebGL2RenderingContext::waitSync): (WebCore::WebGL2RenderingContext::getSyncParameter): * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): (WebCore::WebGLSync::updateCache): (WebCore::WebGLSync::getCachedResult const): (WebCore::WebGLSync::isSignaled const): (WebCore::WebGLSync::scheduleAllowCacheUpdate): * html/canvas/WebGLSync.h: * platform/graphics/GraphicsContextGL.h: * platform/graphics/GraphicsTypesGL.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::fenceSync): (WebCore::GraphicsContextGLOpenGL::isSync): (WebCore::GraphicsContextGLOpenGL::deleteSync): (WebCore::GraphicsContextGLOpenGL::clientWaitSync): (WebCore::GraphicsContextGLOpenGL::waitSync): (WebCore::GraphicsContextGLOpenGL::getSynciv): * platform/graphics/opengl/GraphicsContextGLOpenGL.h: * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::fenceSync): (WebCore::GraphicsContextGLOpenGL::isSync): (WebCore::GraphicsContextGLOpenGL::deleteSync): (WebCore::GraphicsContextGLOpenGL::clientWaitSync): (WebCore::GraphicsContextGLOpenGL::waitSync): (WebCore::GraphicsContextGLOpenGL::getSynciv): LayoutTests: * webgl/TestExpectations: webgl/2.0.0/deqp/functional/gles3/sync.html times out in the layout test harness, though it passes in MiniBrowser. Canonical link: https://commits.webkit.org/227283@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-17 21:51:16 +00:00
, m_sync(ctx.graphicsContextGL()->fenceSync(GraphicsContextGL::SYNC_GPU_COMMANDS_COMPLETE, 0))
[WebGL2] Create empty interface files for new WebGL2 objects. https://bugs.webkit.org/show_bug.cgi?id=140779. <rdar://problem/15002288> Reviewed by Dean Jackson. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLQuery.cpp: Added. (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: Added. * html/canvas/WebGLQuery.idl: Added. * html/canvas/WebGLSampler.cpp: Added. (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: Added. * html/canvas/WebGLSampler.idl: Added. * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isQuery): (WebCore::WebGLSharedObject::isSampler): (WebCore::WebGLSharedObject::isSync): (WebCore::WebGLSharedObject::isTransformFeedback): (WebCore::WebGLSharedObject::isVertexArrayObject): * html/canvas/WebGLSync.cpp: Added. (WebCore::WebGLSync::create): (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: Added. * html/canvas/WebGLSync.idl: Added. * html/canvas/WebGLTransformFeedback.cpp: Added. (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): * html/canvas/WebGLTransformFeedback.h: Added. * html/canvas/WebGLTransformFeedback.idl: Added. * html/canvas/WebGLVertexArrayObject.cpp: Added. (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: Added. * html/canvas/WebGLVertexArrayObject.idl: Added. * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/158782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-22 23:35:15 +00:00
{
[WebGL2] Sync objects https://bugs.webkit.org/show_bug.cgi?id=126942 Patch by James Darpinian <jdarpinian@chromium.org> on 2020-07-17 Reviewed by Dean Jackson. Source/WebCore: Passes WebGL conformance tests webgl/2.0.0/conformance2/sync/sync-webgl-specific.html and webgl/2.0.0/deqp/functional/gles3/sync.html although the latter times out in the layout test harness. * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::fenceSync): (WebCore::WebGL2RenderingContext::isSync): (WebCore::WebGL2RenderingContext::deleteSync): (WebCore::WebGL2RenderingContext::clientWaitSync): (WebCore::WebGL2RenderingContext::waitSync): (WebCore::WebGL2RenderingContext::getSyncParameter): * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): (WebCore::WebGLSync::updateCache): (WebCore::WebGLSync::getCachedResult const): (WebCore::WebGLSync::isSignaled const): (WebCore::WebGLSync::scheduleAllowCacheUpdate): * html/canvas/WebGLSync.h: * platform/graphics/GraphicsContextGL.h: * platform/graphics/GraphicsTypesGL.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::fenceSync): (WebCore::GraphicsContextGLOpenGL::isSync): (WebCore::GraphicsContextGLOpenGL::deleteSync): (WebCore::GraphicsContextGLOpenGL::clientWaitSync): (WebCore::GraphicsContextGLOpenGL::waitSync): (WebCore::GraphicsContextGLOpenGL::getSynciv): * platform/graphics/opengl/GraphicsContextGLOpenGL.h: * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::fenceSync): (WebCore::GraphicsContextGLOpenGL::isSync): (WebCore::GraphicsContextGLOpenGL::deleteSync): (WebCore::GraphicsContextGLOpenGL::clientWaitSync): (WebCore::GraphicsContextGLOpenGL::waitSync): (WebCore::GraphicsContextGLOpenGL::getSynciv): LayoutTests: * webgl/TestExpectations: webgl/2.0.0/deqp/functional/gles3/sync.html times out in the layout test harness, though it passes in MiniBrowser. Canonical link: https://commits.webkit.org/227283@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-17 21:51:16 +00:00
// This value is unused because the sync object is a pointer type, but it needs to be non-zero
// or other parts of the code will assume the object is invalid.
setObject(-1);
[WebGL2] Create empty interface files for new WebGL2 objects. https://bugs.webkit.org/show_bug.cgi?id=140779. <rdar://problem/15002288> Reviewed by Dean Jackson. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLQuery.cpp: Added. (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: Added. * html/canvas/WebGLQuery.idl: Added. * html/canvas/WebGLSampler.cpp: Added. (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: Added. * html/canvas/WebGLSampler.idl: Added. * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isQuery): (WebCore::WebGLSharedObject::isSampler): (WebCore::WebGLSharedObject::isSync): (WebCore::WebGLSharedObject::isTransformFeedback): (WebCore::WebGLSharedObject::isVertexArrayObject): * html/canvas/WebGLSync.cpp: Added. (WebCore::WebGLSync::create): (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: Added. * html/canvas/WebGLSync.idl: Added. * html/canvas/WebGLTransformFeedback.cpp: Added. (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): * html/canvas/WebGLTransformFeedback.h: Added. * html/canvas/WebGLTransformFeedback.idl: Added. * html/canvas/WebGLVertexArrayObject.cpp: Added. (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: Added. * html/canvas/WebGLVertexArrayObject.idl: Added. * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/158782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-22 23:35:15 +00:00
}
Final refactor for WebGL implementation to use only GraphicsContextGL https://bugs.webkit.org/show_bug.cgi?id=218333 Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-11-16 Reviewed by Simon Fraser. Source/WebCore: Change WebGL implementation to use GraphicsContextGL abstract class instead of GraphicsContextGLOpenGL concrete class. This allows implementation of WebGL in GpuProcess, where the remote implementation is one GraphicsContextGL subclass and the actual drawing is done, either in GPUP and non-GPUP cases by the old GraphicsContextGLOpenGL. The GPUP supports only ANGLE flavor of the WebGL implementation. This is because ANGLE contains the functions that are designed to be more secure for the cross-process environment. This is why GraphicsContextGL interface is modified to contain only functions that make sense for ANGLE. Functions unimplemeted by ANGLE are removed from the interface. Calling WebGL code inside #ifdef !USE(ANGLE) will downcast the interface to GraphicsContextGLOpenGL to call the functions that do not make sense to exist in the ANGLE version. Small amount of functions in GraphicsContextGL interface are re-ordered to enable later IPC auto-generation from the interface. ExtensionsGL.h is reformatted according to WebKit style to enable later IPC auto-generation from the interface. No new tests, a refactor. * html/HTMLVideoElement.cpp: (WebCore::HTMLVideoElement::rendererIsNeeded): (WebCore::HTMLVideoElement::parseAttribute): (WebCore::HTMLVideoElement::supportsFullscreen const): (WebCore::HTMLVideoElement::paintCurrentFrameInContext): (WebCore::HTMLVideoElement::copyVideoTextureToPlatformTexture): (WebCore::HTMLVideoElement::hasAvailableVideoFrame const): (WebCore::HTMLVideoElement::webkitEnterFullscreen): * html/HTMLVideoElement.h: * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::create): (WebCore::WebGL2RenderingContext::WebGL2RenderingContext): (WebCore::WebGL2RenderingContext::getBufferSubData): (WebCore::WebGL2RenderingContext::vertexAttribI4uiv): (WebCore::WebGL2RenderingContext::bindSampler): (WebCore::WebGL2RenderingContext::clientWaitSync): (WebCore::WebGL2RenderingContext::deleteTransformFeedback): (WebCore::WebGL2RenderingContext::beginTransformFeedback): (WebCore::WebGL2RenderingContext::endTransformFeedback): (WebCore::WebGL2RenderingContext::transformFeedbackVaryings): (WebCore::WebGL2RenderingContext::getActiveUniforms): * html/canvas/WebGL2RenderingContext.h: * html/canvas/WebGLActiveInfo.h: * html/canvas/WebGLBuffer.cpp: (WebCore::WebGLBuffer::deleteObjectImpl): * html/canvas/WebGLBuffer.h: * html/canvas/WebGLContextGroup.cpp: (WebCore::WebGLContextGroup::getAGraphicsContextGL): * html/canvas/WebGLContextGroup.h: * html/canvas/WebGLContextObject.cpp: (WebCore::WebGLContextObject::getAGraphicsContextGL const): * html/canvas/WebGLContextObject.h: * html/canvas/WebGLDepthTexture.cpp: (WebCore::WebGLDepthTexture::supported): * html/canvas/WebGLDepthTexture.h: * html/canvas/WebGLDrawBuffers.cpp: (WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements): * html/canvas/WebGLFramebuffer.cpp: (WebCore::WebGLFramebuffer::onAccess): (WebCore::WebGLFramebuffer::deleteObjectImpl): (WebCore::WebGLFramebuffer::initializeAttachments): * html/canvas/WebGLFramebuffer.h: * html/canvas/WebGLObject.cpp: (WebCore::WebGLObject::deleteObject): * html/canvas/WebGLObject.h: * html/canvas/WebGLProgram.cpp: (WebCore::WebGLProgram::deleteObjectImpl): (WebCore::WebGLProgram::cacheActiveAttribLocations): (WebCore::WebGLProgram::cacheInfoIfNeeded): * html/canvas/WebGLProgram.h: * html/canvas/WebGLQuery.cpp: (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: * html/canvas/WebGLRenderbuffer.cpp: (WebCore::WebGLRenderbuffer::deleteObjectImpl): * html/canvas/WebGLRenderbuffer.h: * html/canvas/WebGLRenderingContext.cpp: (WebCore::WebGLRenderingContext::create): (WebCore::WebGLRenderingContext::WebGLRenderingContext): * html/canvas/WebGLRenderingContext.h: * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::isHighPerformanceContext): (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase): (WebCore::WebGLRenderingContextBase::initializeNewContext): (WebCore::WebGLRenderingContextBase::compressedTexImage2D): (WebCore::WebGLRenderingContextBase::validateElementArraySize): (WebCore::WebGLRenderingContextBase::validateIndexArrayPrecise): (WebCore::WebGLRenderingContextBase::validateDrawElements): (WebCore::WebGLRenderingContextBase::readPixels): (WebCore::WebGLRenderingContextBase::texImageSourceHelper): (WebCore::WebGLRenderingContextBase::texImage2DBase): (WebCore::WebGLRenderingContextBase::validateTexFuncFormatAndType): (WebCore::WebGLRenderingContextBase::copyTexImage2D): (WebCore::WebGLRenderingContextBase::isTexInternalFormatColorBufferCombinationValid): (WebCore::WebGLRenderingContextBase::vertexAttribfvImpl): (WebCore::WebGLRenderingContextBase::initVertexAttrib0): (WebCore::WebGLRenderingContextBase::maybeRestoreContext): (WebCore::WebGLRenderingContextBase::drawElementsInstanced): * html/canvas/WebGLRenderingContextBase.h: (WebCore::WebGLRenderingContextBase::graphicsContextGL const): * html/canvas/WebGLSampler.cpp: (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: * html/canvas/WebGLShader.cpp: (WebCore::WebGLShader::deleteObjectImpl): * html/canvas/WebGLShader.h: * html/canvas/WebGLShaderPrecisionFormat.h: * html/canvas/WebGLSharedObject.cpp: (WebCore::WebGLSharedObject::getAGraphicsContextGL const): * html/canvas/WebGLSharedObject.h: * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: * html/canvas/WebGLTexture.cpp: (WebCore::WebGLTexture::deleteObjectImpl): * html/canvas/WebGLTexture.h: * html/canvas/WebGLTransformFeedback.cpp: (WebCore::WebGLTransformFeedback::deleteObjectImpl): * html/canvas/WebGLTransformFeedback.h: * html/canvas/WebGLVertexArrayObject.cpp: (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: * html/canvas/WebGLVertexArrayObjectBase.h: * html/canvas/WebGLVertexArrayObjectOES.cpp: (WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl): * html/canvas/WebGLVertexArrayObjectOES.h: * inspector/InspectorShaderProgram.cpp: * platform/graphics/ConcreteImageBuffer.h: * platform/graphics/ExtensionsGL.h: * platform/graphics/FormatConverter.cpp: (WebCore::FormatConverter::convert): * platform/graphics/FormatConverter.h: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContextGL.cpp: * platform/graphics/GraphicsContextGL.h: (WebCore::GraphicsContextGL::contextAttributes const): (WebCore::GraphicsContextGL::setContextAttributes): * platform/graphics/GraphicsTypesGL.h: * platform/graphics/ImageBuffer.h: * platform/graphics/ImageBufferBackend.h: (WebCore::ImageBufferBackend::copyToPlatformTexture const): * platform/graphics/MediaPlayer.cpp: (WebCore::bestMediaEngineForSupportParameters): (WebCore::MediaPlayer::nextMediaEngine): (WebCore::MediaPlayer::loadWithNextMediaEngine): (WebCore::MediaPlayer::cancelLoad): (WebCore::MediaPlayer::setSize): (WebCore::MediaPlayer::copyVideoTextureToPlatformTexture): (WebCore::MediaPlayer::supportsType): (WebCore::MediaPlayer::getSupportedTypes): (WebCore::MediaPlayer::languageOfPrimaryAudioTrack const): (WebCore::MediaPlayer::fileSize const): * platform/graphics/MediaPlayer.h: * platform/graphics/MediaPlayerPrivate.h: (WebCore::MediaPlayerPrivateInterface::hasClosedCaptions const): (WebCore::MediaPlayerPrivateInterface::copyVideoTextureToPlatformTexture): * platform/graphics/angle/ExtensionsGLANGLE.cpp: (WebCore::ExtensionsGLANGLE::compressedTexImage2DRobustANGLE): (WebCore::ExtensionsGLANGLE::compressedTexSubImage2DRobustANGLE): * platform/graphics/angle/ExtensionsGLANGLE.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: (WebCore::MediaPlayerPrivateAVFoundationObjC::clearMediaCache): (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): (WebCore::MediaPlayerPrivateAVFoundationObjC::synchronizeTextTrackState): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenGravity): (WebCore::MediaPlayerPrivateAVFoundationObjC::accessLog const): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformSetVisible): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration const): (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable const): (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded const): (WebCore::MediaPlayerPrivateAVFoundationObjC::assetStatus const): (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity): (WebCore::determineChangedTracksFromNewTracksAndOldItems): (WebCore::MediaPlayerPrivateAVFoundationObjC::copyVideoTextureToPlatformTexture): (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): (WebCore::MediaPlayerPrivateAVFoundationObjC::setBufferingPolicy): * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::copyVideoTextureToPlatformTexture): * platform/graphics/cocoa/IOSurface.mm: (WebCore::optionsForBiplanarSurface): (WebCore::IOSurface::ensurePlatformContext): (WebCore::IOSurface::convertToFormat): * platform/graphics/egl/GLContextEGL.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: (WebCore::MediaPlayerPrivateGStreamer::copyVideoTextureToPlatformTexture): * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: (WebCore::GraphicsContextGLOpenGL::possibleFormatAndTypeForInternalFormat): * platform/graphics/opengl/GraphicsContextGLOpenGL.h: * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::reshape): (WebCore::GraphicsContextGLOpenGL::blendFunc): (WebCore::GraphicsContextGLOpenGL::compileShader): (WebCore::GraphicsContextGLOpenGL::getActiveAttribImpl): (WebCore::GraphicsContextGLOpenGL::getActiveAttrib): (WebCore::GraphicsContextGLOpenGL::getActiveUniformImpl): (WebCore::GraphicsContextGLOpenGL::getActiveUniform): (WebCore::GraphicsContextGLOpenGL::originalSymbolName): (WebCore::GraphicsContextGLOpenGL::mappedSymbolName): (WebCore::GraphicsContextGLOpenGL::deleteVertexArray): (WebCore::GraphicsContextGLOpenGL::isVertexArray): (WebCore::GraphicsContextGLOpenGL::getNonBuiltInActiveSymbolCount): (WebCore::GraphicsContextGLOpenGL::getUnmangledInfoLog): (WebCore::GraphicsContextGLOpenGL::getProgramInfoLog): (WebCore::GraphicsContextGLOpenGL::getShaderiv): (WebCore::GraphicsContextGLOpenGL::getShaderInfoLog): (WebCore::GraphicsContextGLOpenGL::getShaderSource): Source/WebKit: Change MediaPlayerPrivate to use GraphicsContextGL abstract class instead of GraphicsContextGLOpenGL concrete class, since the calling code is doing the same change. * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: (WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture): * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: Canonical link: https://commits.webkit.org/231614@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-16 12:57:13 +00:00
void WebGLSync::deleteObjectImpl(const AbstractLocker&, GraphicsContextGL* context3d, PlatformGLObject object)
[WebGL2] Create empty interface files for new WebGL2 objects. https://bugs.webkit.org/show_bug.cgi?id=140779. <rdar://problem/15002288> Reviewed by Dean Jackson. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLQuery.cpp: Added. (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: Added. * html/canvas/WebGLQuery.idl: Added. * html/canvas/WebGLSampler.cpp: Added. (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: Added. * html/canvas/WebGLSampler.idl: Added. * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isQuery): (WebCore::WebGLSharedObject::isSampler): (WebCore::WebGLSharedObject::isSync): (WebCore::WebGLSharedObject::isTransformFeedback): (WebCore::WebGLSharedObject::isVertexArrayObject): * html/canvas/WebGLSync.cpp: Added. (WebCore::WebGLSync::create): (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: Added. * html/canvas/WebGLSync.idl: Added. * html/canvas/WebGLTransformFeedback.cpp: Added. (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): * html/canvas/WebGLTransformFeedback.h: Added. * html/canvas/WebGLTransformFeedback.idl: Added. * html/canvas/WebGLVertexArrayObject.cpp: Added. (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: Added. * html/canvas/WebGLVertexArrayObject.idl: Added. * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/158782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-22 23:35:15 +00:00
{
UNUSED_PARAM(object);
[WebGL2] Sync objects https://bugs.webkit.org/show_bug.cgi?id=126942 Patch by James Darpinian <jdarpinian@chromium.org> on 2020-07-17 Reviewed by Dean Jackson. Source/WebCore: Passes WebGL conformance tests webgl/2.0.0/conformance2/sync/sync-webgl-specific.html and webgl/2.0.0/deqp/functional/gles3/sync.html although the latter times out in the layout test harness. * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::fenceSync): (WebCore::WebGL2RenderingContext::isSync): (WebCore::WebGL2RenderingContext::deleteSync): (WebCore::WebGL2RenderingContext::clientWaitSync): (WebCore::WebGL2RenderingContext::waitSync): (WebCore::WebGL2RenderingContext::getSyncParameter): * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): (WebCore::WebGLSync::updateCache): (WebCore::WebGLSync::getCachedResult const): (WebCore::WebGLSync::isSignaled const): (WebCore::WebGLSync::scheduleAllowCacheUpdate): * html/canvas/WebGLSync.h: * platform/graphics/GraphicsContextGL.h: * platform/graphics/GraphicsTypesGL.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::fenceSync): (WebCore::GraphicsContextGLOpenGL::isSync): (WebCore::GraphicsContextGLOpenGL::deleteSync): (WebCore::GraphicsContextGLOpenGL::clientWaitSync): (WebCore::GraphicsContextGLOpenGL::waitSync): (WebCore::GraphicsContextGLOpenGL::getSynciv): * platform/graphics/opengl/GraphicsContextGLOpenGL.h: * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::fenceSync): (WebCore::GraphicsContextGLOpenGL::isSync): (WebCore::GraphicsContextGLOpenGL::deleteSync): (WebCore::GraphicsContextGLOpenGL::clientWaitSync): (WebCore::GraphicsContextGLOpenGL::waitSync): (WebCore::GraphicsContextGLOpenGL::getSynciv): LayoutTests: * webgl/TestExpectations: webgl/2.0.0/deqp/functional/gles3/sync.html times out in the layout test harness, though it passes in MiniBrowser. Canonical link: https://commits.webkit.org/227283@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-17 21:51:16 +00:00
context3d->deleteSync(m_sync);
m_sync = nullptr;
}
void WebGLSync::updateCache(WebGLRenderingContextBase& context)
{
if (m_syncStatus == GraphicsContextGL::SIGNALED || !m_allowCacheUpdate)
return;
m_allowCacheUpdate = false;
GraphicsContextGL has a couple non-robust getters and other small API problems preventing GPU process implementation https://bugs.webkit.org/show_bug.cgi?id=219486 Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2020-12-03 Reviewed by Dean Jackson. Changes GraphicsContextGL and ExtensionsGL to not have duplicate names and have the correct function signatures. Changes few remaining GraphicsContextGL getters to use robust GCGLSpan form. Changes few robust getters to GCGLSpan form and moves them from ExtensionsGL to GraphicsContextGL. Changes GraphicsContextGLOpenGL::getActiveUniforms to return the result vector instead of taking it as non-const reference. This way the out vector does not need to be transferred to the GPU process, when the code is implemented. The call site is also more natural. Requests GL_EXT_occlusion_query_boolean so that WebGL 2.0 occlusion queries work when called with gl::GetQueryObjectuivRobustANGLE. Removes use of mapBufferRange and related functions, changes them to a single getBufferSubData. If the mapping ever is useful, the more complex form of API can be added back. Changes the getInternalformativ call site to check erros similar to other generic error checking: first clear the errors and then after the call check if there are new errors. This is slightly less efficient than using the domain knowledge that the function never returns -1 in the slot. Current single-value-as-return-value pattern cannot express this. In the future, GPU process context cannot / will not support passing non-default in-arrays. In the future, the generic error checking pattern will possibly be improved, circumventing the need for the -1 domain knowledge case. Removes getVertexAttrib*v, they are not used. Removes getAttachedShaders, it is not used. Removes the vendor-based workarounds from ANGLE ExtensionsGL, it was not used. No new tests, a refactor. * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::getBufferSubData): (WebCore::WebGL2RenderingContext::getInternalformatParameter): (WebCore::WebGL2RenderingContext::vertexAttribI4uiv): (WebCore::WebGL2RenderingContext::getQueryParameter): (WebCore::WebGL2RenderingContext::bindSampler): (WebCore::WebGL2RenderingContext::getSamplerParameter): (WebCore::WebGL2RenderingContext::clientWaitSync): (WebCore::WebGL2RenderingContext::deleteTransformFeedback): (WebCore::WebGL2RenderingContext::beginTransformFeedback): (WebCore::WebGL2RenderingContext::endTransformFeedback): (WebCore::WebGL2RenderingContext::transformFeedbackVaryings): (WebCore::WebGL2RenderingContext::getActiveUniforms): (WebCore::WebGL2RenderingContext::readPixels): * html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::readPixels): * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::updateCache): * platform/graphics/ExtensionsGL.h: * platform/graphics/GraphicsContextGL.h: (WebCore::GraphicsContextGL::getInternalformati): * platform/graphics/GraphicsTypesGL.h: * platform/graphics/angle/ExtensionsGLANGLE.cpp: (WebCore::ExtensionsGLANGLE::ExtensionsGLANGLE): (WebCore::ExtensionsGLANGLE::getGraphicsResetStatusARB): (WebCore::ExtensionsGLANGLE::getTranslatedShaderSourceANGLE): (WebCore::ExtensionsGLANGLE::blitFramebufferANGLE): (WebCore::ExtensionsGLANGLE::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLANGLE::drawArraysInstancedANGLE): (WebCore::ExtensionsGLANGLE::drawElementsInstancedANGLE): (WebCore::ExtensionsGLANGLE::vertexAttribDivisorANGLE): (WebCore::ExtensionsGLANGLE::getUniformuivRobustANGLE): (WebCore::ExtensionsGLANGLE::getTexLevelParameterivRobustANGLE): (WebCore::ExtensionsGLANGLE::getTexLevelParameterfvRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformfvRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformivRobustANGLE): (WebCore::ExtensionsGLANGLE::getnUniformuivRobustANGLE): * platform/graphics/angle/ExtensionsGLANGLE.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::readnPixels): (WebCore::GraphicsContextGLOpenGL::readnPixelsImpl): (WebCore::GraphicsContextGLOpenGL::getBufferSubData): (WebCore::GraphicsContextGLOpenGL::getInternalformativ): (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): (WebCore::GraphicsContextGLOpenGL::getSynci): * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: (WebCore::ExtensionsGLOpenGL::blitFramebufferANGLE): (WebCore::ExtensionsGLOpenGL::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLOpenGL::drawArraysInstancedANGLE): (WebCore::ExtensionsGLOpenGL::drawElementsInstancedANGLE): (WebCore::ExtensionsGLOpenGL::vertexAttribDivisorANGLE): * platform/graphics/opengl/ExtensionsGLOpenGL.h: * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: (WebCore::ExtensionsGLOpenGLES::blitFramebufferANGLE): (WebCore::ExtensionsGLOpenGLES::renderbufferStorageMultisampleANGLE): (WebCore::ExtensionsGLOpenGLES::drawArraysInstancedANGLE): (WebCore::ExtensionsGLOpenGLES::drawElementsInstancedANGLE): (WebCore::ExtensionsGLOpenGLES::vertexAttribDivisorANGLE): * platform/graphics/opengl/ExtensionsGLOpenGLES.h: * platform/graphics/opengl/GraphicsContextGLOpenGL.h: * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp: (WebCore::GraphicsContextGLOpenGL::readnPixels): * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::reshape): (WebCore::GraphicsContextGLOpenGL::blendFunc): (WebCore::GraphicsContextGLOpenGL::compileShader): (WebCore::GraphicsContextGLOpenGL::getActiveAttribImpl): (WebCore::GraphicsContextGLOpenGL::getActiveAttrib): (WebCore::GraphicsContextGLOpenGL::getActiveUniformImpl): (WebCore::GraphicsContextGLOpenGL::getActiveUniform): (WebCore::GraphicsContextGLOpenGL::originalSymbolName): (WebCore::GraphicsContextGLOpenGL::mappedSymbolName): (WebCore::GraphicsContextGLOpenGL::deleteVertexArray): (WebCore::GraphicsContextGLOpenGL::isVertexArray): (WebCore::GraphicsContextGLOpenGL::getNonBuiltInActiveSymbolCount): (WebCore::GraphicsContextGLOpenGL::getUnmangledInfoLog): (WebCore::GraphicsContextGLOpenGL::getProgramInfoLog): (WebCore::GraphicsContextGLOpenGL::getShaderi): (WebCore::GraphicsContextGLOpenGL::getShaderInfoLog): (WebCore::GraphicsContextGLOpenGL::getShaderSource): (WebCore::GraphicsContextGLOpenGL::drawArraysInstanced): (WebCore::GraphicsContextGLOpenGL::drawElementsInstanced): (WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor): (WebCore::GraphicsContextGLOpenGL::getBufferSubData): (WebCore::GraphicsContextGLOpenGL::getInternalformativ): (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): (WebCore::GraphicsContextGLOpenGL::getSynci): (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): (WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex): (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName): (WebCore::GraphicsContextGLOpenGL::uniformBlockBinding): (WebCore::GraphicsContextGLOpenGL::readnPixels): * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: (WebCore::GraphicsContextGLOpenGL::readnPixels): (WebCore::GraphicsContextGLOpenGL::reshapeFBOs): Canonical link: https://commits.webkit.org/232085@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@270400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-12-03 19:29:34 +00:00
m_syncStatus = context.graphicsContextGL()->getSynci(m_sync, GraphicsContextGL::SYNC_STATUS);
[WebGL2] Sync objects https://bugs.webkit.org/show_bug.cgi?id=126942 Patch by James Darpinian <jdarpinian@chromium.org> on 2020-07-17 Reviewed by Dean Jackson. Source/WebCore: Passes WebGL conformance tests webgl/2.0.0/conformance2/sync/sync-webgl-specific.html and webgl/2.0.0/deqp/functional/gles3/sync.html although the latter times out in the layout test harness. * html/canvas/WebGL2RenderingContext.cpp: (WebCore::WebGL2RenderingContext::fenceSync): (WebCore::WebGL2RenderingContext::isSync): (WebCore::WebGL2RenderingContext::deleteSync): (WebCore::WebGL2RenderingContext::clientWaitSync): (WebCore::WebGL2RenderingContext::waitSync): (WebCore::WebGL2RenderingContext::getSyncParameter): * html/canvas/WebGLRenderingContextBase.h: * html/canvas/WebGLSync.cpp: (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): (WebCore::WebGLSync::updateCache): (WebCore::WebGLSync::getCachedResult const): (WebCore::WebGLSync::isSignaled const): (WebCore::WebGLSync::scheduleAllowCacheUpdate): * html/canvas/WebGLSync.h: * platform/graphics/GraphicsContextGL.h: * platform/graphics/GraphicsTypesGL.h: * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLOpenGL::fenceSync): (WebCore::GraphicsContextGLOpenGL::isSync): (WebCore::GraphicsContextGLOpenGL::deleteSync): (WebCore::GraphicsContextGLOpenGL::clientWaitSync): (WebCore::GraphicsContextGLOpenGL::waitSync): (WebCore::GraphicsContextGLOpenGL::getSynciv): * platform/graphics/opengl/GraphicsContextGLOpenGL.h: * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: (WebCore::GraphicsContextGLOpenGL::fenceSync): (WebCore::GraphicsContextGLOpenGL::isSync): (WebCore::GraphicsContextGLOpenGL::deleteSync): (WebCore::GraphicsContextGLOpenGL::clientWaitSync): (WebCore::GraphicsContextGLOpenGL::waitSync): (WebCore::GraphicsContextGLOpenGL::getSynciv): LayoutTests: * webgl/TestExpectations: webgl/2.0.0/deqp/functional/gles3/sync.html times out in the layout test harness, though it passes in MiniBrowser. Canonical link: https://commits.webkit.org/227283@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@264535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-07-17 21:51:16 +00:00
if (m_syncStatus == GraphicsContextGL::UNSIGNALED)
scheduleAllowCacheUpdate(context);
}
GCGLint WebGLSync::getCachedResult(GCGLenum pname) const
{
switch (pname) {
case GraphicsContextGL::OBJECT_TYPE:
return GraphicsContextGL::SYNC_FENCE;
case GraphicsContextGL::SYNC_STATUS:
return m_syncStatus;
case GraphicsContextGL::SYNC_CONDITION:
return GraphicsContextGL::SYNC_GPU_COMMANDS_COMPLETE;
case GraphicsContextGL::SYNC_FLAGS:
return 0;
}
ASSERT_NOT_REACHED();
return 0;
}
bool WebGLSync::isSignaled() const
{
return m_syncStatus == GraphicsContextGL::SIGNALED;
}
void WebGLSync::scheduleAllowCacheUpdate(WebGLRenderingContextBase& context)
{
auto* canvas = context.htmlCanvas();
if (!canvas)
return;
context.queueTaskKeepingObjectAlive(*canvas, TaskSource::WebGL, [protectedThis = makeRef(*this)]() {
protectedThis->m_allowCacheUpdate = true;
});
[WebGL2] Create empty interface files for new WebGL2 objects. https://bugs.webkit.org/show_bug.cgi?id=140779. <rdar://problem/15002288> Reviewed by Dean Jackson. * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * WebCore.vcxproj/WebCore.vcxproj: * WebCore.vcxproj/WebCore.vcxproj.filters: * WebCore.xcodeproj/project.pbxproj: * html/canvas/WebGLQuery.cpp: Added. (WebCore::WebGLQuery::create): (WebCore::WebGLQuery::~WebGLQuery): (WebCore::WebGLQuery::WebGLQuery): (WebCore::WebGLQuery::deleteObjectImpl): * html/canvas/WebGLQuery.h: Added. * html/canvas/WebGLQuery.idl: Added. * html/canvas/WebGLSampler.cpp: Added. (WebCore::WebGLSampler::create): (WebCore::WebGLSampler::~WebGLSampler): (WebCore::WebGLSampler::WebGLSampler): (WebCore::WebGLSampler::deleteObjectImpl): * html/canvas/WebGLSampler.h: Added. * html/canvas/WebGLSampler.idl: Added. * html/canvas/WebGLSharedObject.h: (WebCore::WebGLSharedObject::isQuery): (WebCore::WebGLSharedObject::isSampler): (WebCore::WebGLSharedObject::isSync): (WebCore::WebGLSharedObject::isTransformFeedback): (WebCore::WebGLSharedObject::isVertexArrayObject): * html/canvas/WebGLSync.cpp: Added. (WebCore::WebGLSync::create): (WebCore::WebGLSync::~WebGLSync): (WebCore::WebGLSync::WebGLSync): (WebCore::WebGLSync::deleteObjectImpl): * html/canvas/WebGLSync.h: Added. * html/canvas/WebGLSync.idl: Added. * html/canvas/WebGLTransformFeedback.cpp: Added. (WebCore::WebGLTransformFeedback::create): (WebCore::WebGLTransformFeedback::~WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::WebGLTransformFeedback): (WebCore::WebGLTransformFeedback::deleteObjectImpl): * html/canvas/WebGLTransformFeedback.h: Added. * html/canvas/WebGLTransformFeedback.idl: Added. * html/canvas/WebGLVertexArrayObject.cpp: Added. (WebCore::WebGLVertexArrayObject::create): (WebCore::WebGLVertexArrayObject::~WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject): (WebCore::WebGLVertexArrayObject::deleteObjectImpl): * html/canvas/WebGLVertexArrayObject.h: Added. * html/canvas/WebGLVertexArrayObject.idl: Added. * platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt: * platform/mac-mountainlion/js/dom/global-constructors-attributes-expected.txt: * platform/mac/js/dom/global-constructors-attributes-expected.txt: Canonical link: https://commits.webkit.org/158782@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178963 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-22 23:35:15 +00:00
}
}
#endif // ENABLE(WEBGL)