Skip to content

Conversation

@carlosgcampos
Copy link
Contributor

@carlosgcampos carlosgcampos commented May 25, 2023

c60b4c7

REGRESSION(2.41): [GTK] Contents not rendered in new web view when realized after configure and frame
https://bugs.webkit.org/show_bug.cgi?id=257324

Reviewed by Michael Catanzaro.

In case of realize happening after the configure and frame, we create a
committed source, but it's not ready for rendering. This patch splits
the swap method into swap and prepareForRendering. When a new frame is
available we always do swap, to be in sync with the web process, but only
prepareForRendering when view is realized. When realize happens after the
configure and frame we only need to call prepareForRendering().

* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp:
(WebKit::AcceleratedBackingStoreDMABuf::Texture::~Texture):
(WebKit::AcceleratedBackingStoreDMABuf::Texture::swap):
(WebKit::AcceleratedBackingStoreDMABuf::Surface::map const):
(WebKit::AcceleratedBackingStoreDMABuf::Surface::swap):
(WebKit::AcceleratedBackingStoreDMABuf::Surface::prepareForRendering):
(WebKit::AcceleratedBackingStoreDMABuf::frame):
(WebKit::AcceleratedBackingStoreDMABuf::realize):
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h:

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

8f6c227

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

@carlosgcampos carlosgcampos requested a review from a team as a code owner May 25, 2023 13:12
@carlosgcampos carlosgcampos self-assigned this May 25, 2023
@carlosgcampos carlosgcampos added the WebKitGTK Bugs related to the Gtk API layer. label May 25, 2023
Copy link
Contributor

@mcatanzaro mcatanzaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well I don't see anything obviously bad with the changes (not that I'd be likely to notice). And I've tested it and verified the bug is actually fixed. Thanks.

@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label May 25, 2023
@carlosgcampos carlosgcampos added unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing and removed merging-blocked Applied to prevent a change from being merged labels May 26, 2023
…alized after configure and frame

https://bugs.webkit.org/show_bug.cgi?id=257324

Reviewed by Michael Catanzaro.

In case of realize happening after the configure and frame, we create a
committed source, but it's not ready for rendering. This patch splits
the swap method into swap and prepareForRendering. When a new frame is
available we always do swap, to be in sync with the web process, but only
prepareForRendering when view is realized. When realize happens after the
configure and frame we only need to call prepareForRendering().

* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.cpp:
(WebKit::AcceleratedBackingStoreDMABuf::Texture::~Texture):
(WebKit::AcceleratedBackingStoreDMABuf::Texture::swap):
(WebKit::AcceleratedBackingStoreDMABuf::Surface::map const):
(WebKit::AcceleratedBackingStoreDMABuf::Surface::swap):
(WebKit::AcceleratedBackingStoreDMABuf::Surface::prepareForRendering):
(WebKit::AcceleratedBackingStoreDMABuf::frame):
(WebKit::AcceleratedBackingStoreDMABuf::realize):
* Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreDMABuf.h:

Canonical link: https://commits.webkit.org/264558@main
@webkit-commit-queue
Copy link
Collaborator

Committed 264558@main (c60b4c7): https://commits.webkit.org/264558@main

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

@webkit-commit-queue webkit-commit-queue merged commit c60b4c7 into WebKit:main May 26, 2023
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label May 26, 2023
@carlosgcampos carlosgcampos deleted the gtk4-late-realize branch May 26, 2023 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WebKitGTK Bugs related to the Gtk API layer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants