tests/kms/render: Fix paint-view callback type signature

It was missing a cairo_region_t. This also needs adapting the test case,
since prior to this, we didn't actually bump the paint counter when
painting.

When a scanout test isn't waiting to go from compositing to scanout, but
from scanout to compositing, we should not early out when we actually
composited, since that's what we're expecting to see.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2795>
This commit is contained in:
Jonas Ådahl 2022-10-13 17:54:29 +02:00
parent c54b350313
commit 24f44aa33e

View File

@ -117,6 +117,7 @@ on_scanout_before_paint (ClutterStage *stage,
static void
on_scanout_paint_view (ClutterStage *stage,
ClutterStageView *stage_view,
cairo_region_t *region,
KmsRenderingTest *test)
{
test->scanout.n_paints++;
@ -139,7 +140,7 @@ on_scanout_presented (ClutterStage *stage,
GError *error = NULL;
drmModeCrtc *drm_crtc;
if (test->scanout.n_paints > 0)
if (test->wait_for_scanout && test->scanout.n_paints > 0)
return;
if (test->wait_for_scanout && test->scanout.fb_id == 0)