This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch wl/browser-all
in repository enlightenment.
View the commit online.
commit c1bb326ff6c3ee8dded46066b3a3dabe1264e959
Author: Cedric BAIL <[email protected]>
AuthorDate: Sat Aug 8 18:12:34 2026 -0600
e_comp_wl - advertise scale 1 until set_buffer_scale is honoured
E-00. A stopgap; revert this commit when E-17 lands.
We send wl_output.scale = e_scale but ignore wl_surface.set_buffer_scale -
_e_comp_wl_surface_cb_buffer_scale_set is an empty stub. A client that
believes the advertised scale attaches a buffer at 2x and we paint it 1:1,
so on a HiDPI zone every GTK and Chromium window comes out at double size.
Advertising 1 is the lesser wrong: clients hand us 1x buffers that we paint
correctly, at the cost of them not being crisp. Getting it right needs the
buffer scale honoured end to end, which needs EFL-01 first (E-17), plus the
damage path split - e_comp_wl.c still assumes damage and damage_buffer are
the same because we do not support buffer_scale, transform or viewport.
Kept behind a named function rather than inlined so E-17 has one obvious
place to change and this commit reverts cleanly. test_output.c asserts the
value and says what to do when E-17 lands.
Verified only on the buffer backend, which is 1024x768 with no HiDPI zone -
this still wants a look on real hardware.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FtoiXoSKUmZb6Aix6U3GZS
---
src/bin/e_comp_wl.c | 15 ++++++++++++++-
src/tests/wayland/test_output.c | 11 ++++++++++-
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index bdc1be553..8de19ccde 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -3280,6 +3280,19 @@ _e_comp_wl_cb_output_unbind(struct wl_resource *resource)
output->resources = eina_list_remove(output->resources, resource);
}
+/* E-00: we advertise wl_output.scale but ignore wl_surface.set_buffer_scale -
+ * _e_comp_wl_surface_cb_buffer_scale_set is an empty stub - so a client that
+ * believes us attaches a 2x buffer which we then paint 1:1, and every window
+ * on a HiDPI zone comes out at double size.
+ *
+ * Claim scale 1 until the buffer scale is really honoured. Revert this commit
+ * when E-17 lands. */
+static int32_t
+_e_comp_wl_output_scale_get(E_Comp_Wl_Output *output EINA_UNUSED)
+{
+ return 1;
+}
+
static void
_e_comp_wl_output_cb_release(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
{
@@ -3324,7 +3337,7 @@ _e_comp_wl_output_resource_update(E_Comp_Wl_Output *output, struct wl_resource *
output->model ?: "", output->transform);
if (version >= WL_OUTPUT_SCALE_SINCE_VERSION)
- wl_output_send_scale(resource, output->scale);
+ wl_output_send_scale(resource, _e_comp_wl_output_scale_get(output));
/* 3 == preferred + current */
wl_output_send_mode(resource, 3, output->w, output->h, output->refresh);
diff --git a/src/tests/wayland/test_output.c b/src/tests/wayland/test_output.c
index 488f943ba..b90691c7b 100644
--- a/src/tests/wayland/test_output.c
+++ b/src/tests/wayland/test_output.c
@@ -6,7 +6,9 @@
* - the global binds at version 4 at all;
* - name and description arrive, name is not a shared placeholder, and both
* arrive *before* the first done as the initial burst requires;
- * - the release request is accepted (v3) rather than killing the client.
+ * - the release request is accepted (v3) rather than killing the client;
+ * - scale is 1 while set_buffer_scale is still a stub (E-00). When E-17
+ * lands and E-00 is reverted, this expectation goes with it.
*/
#include <stdio.h>
#include <stdlib.h>
@@ -178,6 +180,13 @@ main(void)
FAIL("scale arrived after done #%d, must be in the initial burst",
out.scale_at_done);
+ /* E-00: set_buffer_scale is still a stub, so claiming anything but 1 makes
+ * clients hand us buffers we then paint at the wrong size. */
+ if (out.scale != 1)
+ FAIL("advertised scale %d, expected 1 while set_buffer_scale is a stub "
+ "(E-00); if E-17 has landed, this check should have been removed "
+ "with it", out.scale);
+
/* v3 release. If this is not implemented the compositor kills the client
* for an unknown opcode, so the roundtrip below is the assertion. */
wl_output_release(out.output);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.