weston/tests
Michael Olbrich a7e8bd4bea subsurface: don't forget to repaint after the first sub-surface commit
For the following sequence, weston will not trigger a repaint:

1. create the main surface
2. create another surface and attach it as a sub-surface to the main surface
3. set the sub-surface to desync
4. attach a buffer to the main surface and commit it
5. attach a buffer to the sub-surface and commit it

Step 5 should cause the sub-surface to become mapped. However, Weston fails to
schedule a repaint in that case, so the sub-surface will not appear until
something else causes a repaint on that output, e.g. the main window.

And sub-surfaces are special when it comes to mapping because
weston_surface_is_mapped() will not return true until the parent surface is
mapped as well. So right now, weston_surface_map() may be called multiple times
and it will send the map_signal each time.

So to fix all this and make it clearer:

1. define a separate weston_surface_start_mapping() function to make it clearer
   that the (sub-)surface may not be fully mapped at the end
2. check surface->is_mapped explicitly to ensure that the sub-surface is only
   mapped once.
3. call weston_view_update_transform() for all views of the sub-surface when the
   parent surface is already mapped to ensure that a repaint for all relevant
   outputs is triggered.

The new test checks this by waiting for a frame event for the first subsurface
commit. Without these changes, the test will block until it is killed by the
timeout.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
2024-08-07 15:10:49 +00:00
..
reference
visualization
alpha-blending-test.c tests: Only wait for frame callback when necessary 2024-02-22 14:26:32 +00:00
assert-test.c shared: add weston_assert_false() 2024-05-06 10:39:42 +00:00
bad-buffer-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
buffer-transforms-test.c tests: Only wait for frame callback when necessary 2024-02-22 14:26:32 +00:00
color-icc-output-test.c tests: replace mat2XYZ 2024-04-19 12:19:36 +00:00
color-lcms-optimizer-test.c
color-management-test.c color: update color-management protocol to xx-v4 2024-08-07 13:36:49 +00:00
color-metadata-errors-test.c tests: add EOTF and colorimetry mode parsing 2024-05-06 10:39:42 +00:00
color-metadata-parsing-test.c tests: parse colorimetry-mode=bt2020rgb 2024-05-06 10:39:42 +00:00
color_util.c
color_util.h
config-parser-test.c
constraints-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
custom-env-test.c
devices-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
drm-formats-test.c
drm-smoke-test.c tests/drm-*: Log drm-backend by default 2024-08-02 20:03:41 +03:00
drm-writeback-screenshot-test.c tests/drm-*: Log drm-backend by default 2024-08-02 20:03:41 +03:00
event-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
image-iter.h
input-timestamps-helper.c
input-timestamps-helper.h
internal-screenshot-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
iterate-debug-scopes-test.c
ivi-layout-internal-test.c tests: remove unnecessary weston.h includes 2023-12-18 15:34:26 +00:00
ivi-layout-test-client.c
ivi-layout-test-plugin.c Rename compositor/ to frontend/ 2023-12-18 15:34:26 +00:00
ivi-shell-app-test.c
ivi-test.h
keyboard-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
kiosk-shell-test.c tests: Just keep PIXMAN as renderer 2024-05-02 16:05:18 +03:00
lcms-util-test.c
lcms_util.c tests: fix perceptual intent in cLUT ICC profiles 2024-04-19 12:19:36 +00:00
lcms_util.h tests: replace mat2XYZ 2024-04-19 12:19:36 +00:00
linux-explicit-synchronization-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
matrix-test.c
matrix-transform-test.c
meson.build tests: Add kiosk-shell testing 2024-05-01 14:18:43 +03:00
output-capture-protocol-test.c
output-damage-test.c tests: Only wait for frame callback when necessary 2024-02-22 14:26:32 +00:00
output-decorations-test.c
output-transforms-test.c tests: Only wait for frame callback when necessary 2024-02-22 14:26:32 +00:00
paint-node-test.c tests: Just keep PIXMAN as renderer 2024-05-02 16:05:18 +03:00
plugin-registry-test.c tests: remove unnecessary weston.h includes 2023-12-18 15:34:26 +00:00
pointer-shot-test.c tests: Only wait for frame callback when necessary 2024-02-22 14:26:32 +00:00
pointer-test.c tests: Only wait for frame callback when necessary 2024-02-22 14:26:32 +00:00
presentation-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
roles-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
safe-signal-output-removal-test.c replace weston_signal_emit_mutable with wl_signal_emit_mutable 2023-12-04 11:37:17 +02:00
safe-signal-test.c replace weston_signal_emit_mutable with wl_signal_emit_mutable 2023-12-04 11:37:17 +02:00
setbacklight.c
single-pixel-buffer-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
string-test.c
subsurface-shot-test.c subsurface: don't forget to repaint after the first sub-surface commit 2024-08-07 15:10:49 +00:00
subsurface-test.c helpers: Add FALLTHROUGH macro 2024-07-04 14:15:04 +00:00
surface-global-test.c tests: remove unnecessary weston.h includes 2023-12-18 15:34:26 +00:00
surface-screenshot-test.c Rename compositor/ to frontend/ 2023-12-18 15:34:26 +00:00
surface-test.c tests: remove unnecessary weston.h includes 2023-12-18 15:34:26 +00:00
text-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
timespec-test.c
touch-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
vertex-clip-test.c gl-renderer: Do not expose clipper_clip() in header 2024-05-30 09:09:45 +00:00
viewporter-shot-test.c tests: Only wait for frame callback when necessary 2024-02-22 14:26:32 +00:00
viewporter-test.c tests: Speed up runtime using immediate repaint on capture 2024-02-22 14:26:32 +00:00
weston-test-client-helper.c tests: Only wait for frame callback when necessary 2024-02-22 14:26:32 +00:00
weston-test-client-helper.h tests: Add kiosk-shell testing 2024-05-01 14:18:43 +03:00
weston-test-desktop-shell.c weston-test-desktop-shell: Use the weston_view_move_to_layer helper 2024-06-07 11:59:25 +00:00
weston-test-fixture-compositor.c tests: Add kiosk-shell testing 2024-05-01 14:18:43 +03:00
weston-test-fixture-compositor.h tests: Add kiosk-shell testing 2024-05-01 14:18:43 +03:00
weston-test-runner.c tests: add helpers to create unique filenames 2024-02-12 14:10:44 +00:00
weston-test-runner.h tests: add helpers to create unique filenames 2024-02-12 14:10:44 +00:00
weston-test.c Rename compositor/ to frontend/ 2023-12-18 15:34:26 +00:00
weston-testsuite-data.h
xcb-client-helper.c xcb-client-helper: Call xcb_wait_for_event directly 2024-04-11 10:06:56 -05:00
xcb-client-helper.h
xwayland-test.c
yuv-buffer-test.c gl-renderer: Support NV24 shm format 2024-06-19 15:41:20 +08:00