Skip to content
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

[WPE] WPE Platform: Opaque region support #25344

Merged

Conversation

carlosgcampos
Copy link
Contributor

@carlosgcampos carlosgcampos commented Mar 1, 2024

6b96e27

[WPE] WPE Platform: Opaque region support
https://bugs.webkit.org/show_bug.cgi?id=267705

Reviewed by Alejandro G. Castro.

Add API to set the opaque region on a WPEView and use it from WebKit to
set the web view region as opaque when the background color is opaque.

* Source/WebKit/UIProcess/API/wpe/WebKitWebViewWPE.cpp:
(webkit_web_view_set_background_color):
* Source/WebKit/WPEPlatform/CMakeLists.txt:
* Source/WebKit/WPEPlatform/wpe/WPERectangle.cpp: Copied from Source/WebKit/WPEPlatform/wpe/wpe-platform.h.
(wpe_rectangle_copy):
(wpe_rectangle_free):
* Source/WebKit/WPEPlatform/wpe/WPERectangle.h: Copied from Source/WebKit/WPEPlatform/wpe/wpe-platform.h.
* Source/WebKit/WPEPlatform/wpe/WPEView.cpp:
(wpe_view_set_opaque_rectangles):
* Source/WebKit/WPEPlatform/wpe/WPEView.h:
* Source/WebKit/WPEPlatform/wpe/wayland/WPEViewWayland.cpp:
(wpeViewWaylandConstructed):
(wpeViewWaylandSetOpaqueRectangles):
(wpe_view_wayland_class_init):
* Source/WebKit/WPEPlatform/wpe/wpe-platform.h:

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

5777731

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

@carlosgcampos carlosgcampos requested review from zdobersek and a team as code owners March 1, 2024 11:59
@carlosgcampos carlosgcampos self-assigned this Mar 1, 2024
@carlosgcampos carlosgcampos added the WPE WebKit WebKit WPE component label Mar 1, 2024
Copy link
Contributor

@alexgcastro alexgcastro left a comment

Choose a reason for hiding this comment

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

LGTM!

Source/WebKit/WPEPlatform/wpe/WPERectangle.cpp Outdated Show resolved Hide resolved
@carlosgcampos carlosgcampos added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Mar 5, 2024
https://bugs.webkit.org/show_bug.cgi?id=267705

Reviewed by Alejandro G. Castro.

Add API to set the opaque region on a WPEView and use it from WebKit to
set the web view region as opaque when the background color is opaque.

* Source/WebKit/UIProcess/API/wpe/WebKitWebViewWPE.cpp:
(webkit_web_view_set_background_color):
* Source/WebKit/WPEPlatform/CMakeLists.txt:
* Source/WebKit/WPEPlatform/wpe/WPERectangle.cpp: Copied from Source/WebKit/WPEPlatform/wpe/wpe-platform.h.
(wpe_rectangle_copy):
(wpe_rectangle_free):
* Source/WebKit/WPEPlatform/wpe/WPERectangle.h: Copied from Source/WebKit/WPEPlatform/wpe/wpe-platform.h.
* Source/WebKit/WPEPlatform/wpe/WPEView.cpp:
(wpe_view_set_opaque_rectangles):
* Source/WebKit/WPEPlatform/wpe/WPEView.h:
* Source/WebKit/WPEPlatform/wpe/wayland/WPEViewWayland.cpp:
(wpeViewWaylandConstructed):
(wpeViewWaylandSetOpaqueRectangles):
(wpe_view_wayland_class_init):
* Source/WebKit/WPEPlatform/wpe/wpe-platform.h:

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

Committed 275684@main (6b96e27): https://commits.webkit.org/275684@main

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

@webkit-commit-queue webkit-commit-queue merged commit 6b96e27 into WebKit:main Mar 5, 2024
@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 Mar 5, 2024
@carlosgcampos carlosgcampos deleted the wpe-platform-opaque-region branch March 5, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WPE WebKit WebKit WPE component
Projects
None yet
5 participants