Skip to content

GraphicsContextGL::m_layerComposited is a redundant flag #19633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kkinnunen-apple
Copy link
Contributor

@kkinnunen-apple kkinnunen-apple commented Oct 27, 2023

db15813

GraphicsContextGL::m_layerComposited is a redundant flag
https://bugs.webkit.org/show_bug.cgi?id=263772
rdar://117582088

Reviewed by Don Olmstead.

The flag would be queried by
WebGLRenderingContextBase::clearIfComposited to understand if the
backbuffer needs to be cleared after prepareForDisplay before next draw
call. This is already taken care of by buffersToAutoClear variable which
tracks this state and is reset in same location, at prepareForDisplay.

The flag would be queried by GraphicsContextGL prepareForDisplay
implementations. This is taken care of by the caller, e.g. the caller
only schedules a prepare when draw has happened.

Work towards simplifying the default framebuffer implementation, in
order to implement premultipliedAlpha compositing.

* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::clearIfComposited):
(WebCore::WebGLRenderingContextBase::prepareForDisplay):
* Source/WebCore/platform/graphics/GraphicsContextGL.cpp:
(WebCore::GraphicsContextGL::markContextChanged):
(WebCore::GraphicsContextGL::markLayerComposited):
(WebCore::GraphicsContextGL::layerComposited const): Deleted.
* Source/WebCore/platform/graphics/GraphicsContextGL.h:
* Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
(WebCore::GraphicsContextGLCocoa::prepareForDisplayWithFinishedSignal):
* Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp:
(WebCore::GraphicsContextGLGBM::prepareForDisplay):
* Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
(WebCore::GraphicsContextGLTextureMapperANGLE::prepareForDisplay):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::markContextChanged):

Canonical link: https://commits.webkit.org/269939@main

6c201cc

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🛠 gtk
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🧪 gtk-wk2
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 api-gtk
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2
✅ 🛠 tv-sim
✅ 🛠 🧪 merge ✅ 🛠 watch
✅ 🛠 watch-sim

@kkinnunen-apple kkinnunen-apple self-assigned this Oct 27, 2023
@kkinnunen-apple kkinnunen-apple added the WebGL Bugs in WebKit’s implementation of the WebGL standard. label Oct 27, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Oct 27, 2023
@kkinnunen-apple kkinnunen-apple removed the merging-blocked Applied to prevent a change from being merged label Oct 30, 2023
@kkinnunen-apple kkinnunen-apple force-pushed the webgl-remmotve-layercomposited-for-review-1 branch from 93e33e0 to 6c201cc Compare October 30, 2023 11:43
@kkinnunen-apple kkinnunen-apple added the merge-queue Applied to send a pull request to merge-queue label Oct 30, 2023
https://bugs.webkit.org/show_bug.cgi?id=263772
rdar://117582088

Reviewed by Don Olmstead.

The flag would be queried by
WebGLRenderingContextBase::clearIfComposited to understand if the
backbuffer needs to be cleared after prepareForDisplay before next draw
call. This is already taken care of by buffersToAutoClear variable which
tracks this state and is reset in same location, at prepareForDisplay.

The flag would be queried by GraphicsContextGL prepareForDisplay
implementations. This is taken care of by the caller, e.g. the caller
only schedules a prepare when draw has happened.

Work towards simplifying the default framebuffer implementation, in
order to implement premultipliedAlpha compositing.

* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::clearIfComposited):
(WebCore::WebGLRenderingContextBase::prepareForDisplay):
* Source/WebCore/platform/graphics/GraphicsContextGL.cpp:
(WebCore::GraphicsContextGL::markContextChanged):
(WebCore::GraphicsContextGL::markLayerComposited):
(WebCore::GraphicsContextGL::layerComposited const): Deleted.
* Source/WebCore/platform/graphics/GraphicsContextGL.h:
* Source/WebCore/platform/graphics/cocoa/GraphicsContextGLCocoa.mm:
(WebCore::GraphicsContextGLCocoa::prepareForDisplayWithFinishedSignal):
* Source/WebCore/platform/graphics/gbm/GraphicsContextGLGBM.cpp:
(WebCore::GraphicsContextGLGBM::prepareForDisplay):
* Source/WebCore/platform/graphics/texmap/GraphicsContextGLTextureMapperANGLE.cpp:
(WebCore::GraphicsContextGLTextureMapperANGLE::prepareForDisplay):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::markContextChanged):

Canonical link: https://commits.webkit.org/269939@main
@webkit-commit-queue webkit-commit-queue force-pushed the webgl-remmotve-layercomposited-for-review-1 branch from 6c201cc to db15813 Compare October 30, 2023 14:20
@webkit-commit-queue
Copy link
Collaborator

Committed 269939@main (db15813): https://commits.webkit.org/269939@main

Reviewed commits have been landed. Closing PR #19633 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Oct 30, 2023
@webkit-commit-queue webkit-commit-queue merged commit db15813 into WebKit:main Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebGL Bugs in WebKit’s implementation of the WebGL standard.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants