commit | 1aa2bc0fd858b80ac3eef6a22476849c048c6347 | [log] [tgz] |
---|---|---|
author | commit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Mon Jan 24 11:52:46 2022 +0000 |
committer | commit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc> | Mon Jan 24 11:52:46 2022 +0000 |
tree | d67c406a8bf37720c23405544f02d1c7afb7df9d | |
parent | 4e03cba992495577d57f5c39396dba2aeb267bbc [diff] |
texImage2d fails to set same video frame to multiple textures https://bugs.webkit.org/show_bug.cgi?id=203148 <rdar://problem/56436745> Patch by Kimmo Kinnunen <kkinnunen@apple.com> on 2022-01-24 Reviewed by Darin Adler. Source/WebCore: WebGL optimizes repeated video uploads to same texture, due to this being usual practice among pages. Reason is that there are no API to know when the video frame updates. The algorithm was: - If the IOSurface is the same as in the last call - If the texture contents has not changed since we last modified this texture then skip the upload. However, this logic skips errorneously if the "last call" updates some other texture. Fix and test the above. There are other issues for the current algorithm. This patch fixes some other theoretical ones: - If the texture is deleted and new one gets assigned the same texture id and the content seed would clash - Video was uploaded to a different level The previous implementation was keeping per-texture seed value map in the context (GraphicsContextGLANGLE) and per-teture seed value map in the texture upload helper (GraphicsContextGLCVCocoa) and last uploaded IOSurface seed in the upload helper (not per texture). The implementation in this patch keeps per-texture known content description in the texture upload helper and invalidates this when each texture changes. The known content description is the parameter list of the texture upload call. Test: webgl/pending/conformance/textures/misc/tex-image-video-repeated.html * platform/graphics/GraphicsContextGLState.h: (WebCore::GraphicsContextGLState::setBoundTexture): * platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLANGLE::texImage2D): (WebCore::GraphicsContextGLANGLE::texSubImage2D): (WebCore::GraphicsContextGLANGLE::compressedTexImage2D): (WebCore::GraphicsContextGLANGLE::compressedTexSubImage2D): (WebCore::GraphicsContextGLANGLE::texStorage2D): (WebCore::GraphicsContextGLANGLE::texStorage3D): (WebCore::GraphicsContextGLANGLE::texImage2DDirect): (WebCore::GraphicsContextGLANGLE::framebufferTexture2D): (WebCore::GraphicsContextGLANGLE::createTexture): (WebCore::GraphicsContextGLANGLE::deleteTexture): (WebCore::GraphicsContextGLANGLE::invalidateKnownTextureContent): (WebCore::GraphicsContextGLANGLE::textureSeed): Deleted. * platform/graphics/angle/GraphicsContextGLANGLE.h: * platform/graphics/cocoa/GraphicsContextGLCocoa.h: * platform/graphics/cocoa/GraphicsContextGLCocoa.mm: (WebCore::GraphicsContextGLCocoa::invalidateKnownTextureContent): * platform/graphics/cv/GraphicsContextGLCVCocoa.cpp: (WebCore::GraphicsContextGLCVCocoa::TextureContent::operator== const): (WebCore::GraphicsContextGLCVCocoa::copyVideoSampleToTexture): (WebCore::GraphicsContextGLCVCocoa::invalidateKnownTextureContent): * platform/graphics/cv/GraphicsContextGLCVCocoa.h: LayoutTests: Add a test for testing the bug in which some video texture uploads were skipped errorneously. * webgl/pending/conformance/textures/misc/tex-image-video-repeated.html: Added. * webgl/pending/conformance/textures/misc/tex-image-video-repeated-expected.txt: Added. * webgl/pending/resources/webgl_test_files/conformance/textures/misc/tex-image-video-repeated.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@288434 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebKit is a cross-platform web browser engine. On iOS and macOS, it powers Safari, Mail, iBooks, and many other applications.
Visit WebKit Feature Status page to see which Web API has been implemented, in development, or under consideration.
On macOS, download Safari Technology Preview to test the latest version of WebKit. On Linux, download Epiphany Technology Preview. On Windows, you'll have to build it yourself.
Once your bug is filed, you will receive email when it is updated at each stage in the bug life cycle. After the bug is considered fixed, you may be asked to download the latest nightly and confirm that the fix works for you.
On Windows, follow the instructions on our website.
Run the following command to clone WebKit's Git SVN repository:
git clone git@github.com:WebKit/WebKit.git WebKit
or
git clone https://github.com/WebKit/WebKit.git WebKit
If you want to be able to track Subversion revision from your git checkout, you can run the following command to do so:
Tools/Scripts/git-webkit setup-git-svn
For information about this, and other aspects of using Git with WebKit, read the wiki page.
If you don‘t want to use Git, run the following command to check out WebKit’s Subversion repository:
svn checkout https://svn.webkit.org/repository/webkit/trunk WebKit
Install Xcode and its command line tools if you haven't done so already:
xcode-select --install
Run the following command to build a debug build with debugging symbols and assertions:
Tools/Scripts/build-webkit --debug
For performance testing, and other purposes, use --release
instead.
You can open WebKit.xcworkspace
to build and debug WebKit within Xcode.
If you don't use a custom build location in Xcode preferences, you have to update the workspace settings to use WebKitBuild
directory. In menu bar, choose File > Workspace Settings, then click the Advanced button, select “Custom”, “Relative to Workspace”, and enter WebKitBuild
for both Products and Intermediates.
iOS, tvOS and watchOS are all considered embedded builds. The first time after you install a new Xcode, you will need to run:
sudo Tools/Scripts/configure-xcode-for-embedded-development
Without this step, you will see the error message: “target specifies product type ‘com.apple.product-type.tool’, but there’s no such product type for the ‘iphonesimulator’ platform.
” when building target JSCLLIntOffsetsExtractor
of project JavaScriptCore
.
Run the following command to build a debug build with debugging symbols and assertions for embedded simulators:
Tools/Scripts/build-webkit --debug --<platform>-simulator
or embedded devices:
Tools/Scripts/build-webkit --debug --<platform>-device
where platform
is ios
, tvos
or watchos
.
For production builds:
cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ninja sudo ninja install
For development builds:
Tools/gtk/install-dependencies Tools/Scripts/update-webkitgtk-libs Tools/Scripts/build-webkit --gtk --debug
For more information on building WebKitGTK+, see the wiki page.
For production builds:
cmake -DPORT=WPE -DCMAKE_BUILD_TYPE=RelWithDebInfo -GNinja ninja sudo ninja install
For development builds:
Tools/wpe/install-dependencies Tools/Scripts/update-webkitwpe-libs Tools/Scripts/build-webkit --wpe --debug
For building WebKit on Windows, see the wiki page.
Run the following command to launch Safari with your local build of WebKit:
Tools/Scripts/run-safari --debug
The run-safari
script sets the DYLD_FRAMEWORK_PATH
environment variable to point to your build products, and then launches /Applications/Safari.app
. DYLD_FRAMEWORK_PATH
tells the system loader to prefer your build products over the frameworks installed in /System/Library/Frameworks
.
To run other applications with your local build of WebKit, run the following command:
Tools/Scripts/run-webkit-app <application-path>
Run the following command to launch iOS simulator with your local build of WebKit:
run-safari --debug --ios-simulator
In both cases, if you have built release builds instead, use --release
instead of --debug
.
If you have a development build, you can use the run-minibrowser script, e.g.:
run-minibrowser --debug --wpe
Pass one of --gtk
, --jsc-only
, or --wpe
to indicate the port to use.
Congratulations! You’re up and running. Now you can begin coding in WebKit and contribute your fixes and new features to the project. For details on submitting your code to the project, read Contributing Code.