WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
245767
web view is flipped when using soft rendering under wayland
https://bugs.webkit.org/show_bug.cgi?id=245767
Summary
web view is flipped when using soft rendering under wayland
Dominique Martinet
Reported
2022-09-27 23:02:28 PDT
When using soft rendering under wayland, the web view is flipped. I unfortunately cannot take screenshots easily in this configuration but it's really just that: menu etc all are correct and the web page itself is flipped, with links at their original position, that makes navigation quite interesting... I believe this is just a follow-up on
https://bugs.webkit.org/show_bug.cgi?id=218354
which was fixed in this commit for the GL happy path:
https://github.com/WebKit/WebKit/commit/e8c1de325def48890596add0ca6c5f756b7308b9
("[GTK4] WebView is flipped
https://bugs.webkit.org/show_bug.cgi?id=218354
") My problem is that I did not use the happy path ("GDK is not able to create a GL context, falling back to glReadPixels (slow!)" message) and going through the other flipping path that did not get removed... I did not understand why it was added in the first place, or where it might be required at all -- my setup is on debian stable with cairo 1.16.0 and pangocairo 1.46.2. Since that also affected the happy GTK4 path I believe new versions also will agree with me. FWIW I since fixed GL as well, and that works both with and without this patch; but might as well get this right: ``` diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp index 631649923730..88541f326368 100644 --- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp +++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp @@ -605,11 +605,6 @@ bool AcceleratedBackingStoreWayland::paint(cairo_t* cr, const IntRect& clipRect) RELEASE_ASSERT_NOT_REACHED(); } - // The compositor renders the texture flipped for gdk_cairo_draw_from_gl, fix that here. - cairo_matrix_t transform; - cairo_matrix_init(&transform, 1, 0, 0, -1, 0, cairo_image_surface_get_height(m_surface.get()) / m_webPage.deviceScaleFactor()); - cairo_transform(cr, &transform); - cairo_rectangle(cr, clipRect.x(), clipRect.y(), clipRect.width(), clipRect.height()); cairo_set_source_surface(cr, m_surface.get(), 0, 0); cairo_set_operator(cr, CAIRO_OPERATOR_OVER); ``` I'll try to submit a PR with that.
Attachments
Add attachment
proposed patch, testcase, etc.
Dominique Martinet
Comment 1
2022-09-27 23:13:29 PDT
Opened
https://github.com/WebKit/WebKit/pull/4785
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug