From 24f44aa33ec017ee6249a0902f47e79a4a37114e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 13 Oct 2022 17:54:29 +0200 Subject: [PATCH] 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: --- src/tests/native-kms-render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tests/native-kms-render.c b/src/tests/native-kms-render.c index cd314e4b4..ab7fb9c58 100644 --- a/src/tests/native-kms-render.c +++ b/src/tests/native-kms-render.c @@ -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)