[mutter/gnome-3-30] tests: Don't check pixels outside actor allocation
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-30] tests: Don't check pixels outside actor allocation
- Date: Thu, 24 Jan 2019 17:15:42 +0000 (UTC)
commit 5e4cb54bb5ced1a5829fb903fe1729f5da248b0c
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Dec 18 12:54:09 2018 +0000
tests: Don't check pixels outside actor allocation
The actor-shader-effect test actors are 50px wide, but we check the 51st
pixel. This went along undetected until "clutter: Avoid rounding
compensation when invalidating 2D actors" because the paint volumes were
made slightly bigger and the shaders paint all over them (I guess nobody
noticed those actors being actually ~52px wide).
Update the test to check the middle of the opposite edge, so we keep neatly
rounded numbers.
(cherry picked from commit 1d73533f786b8f83fcffae7e5f5965d3b1f4e57a)
clutter/tests/conform/actor-shader-effect.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/clutter/tests/conform/actor-shader-effect.c b/clutter/tests/conform/actor-shader-effect.c
index d3ddd384f..93a43ea8b 100644
--- a/clutter/tests/conform/actor-shader-effect.c
+++ b/clutter/tests/conform/actor-shader-effect.c
@@ -230,13 +230,13 @@ paint_cb (ClutterStage *stage,
gboolean *was_painted = data;
/* old shader effect */
- g_assert_cmpint (get_pixel (50, 50), ==, 0xff0000);
+ g_assert_cmpint (get_pixel (0, 25), ==, 0xff0000);
/* new shader effect */
- g_assert_cmpint (get_pixel (150, 50), ==, 0x00ffff);
+ g_assert_cmpint (get_pixel (100, 25), ==, 0x00ffff);
/* another new shader effect */
- g_assert_cmpint (get_pixel (250, 50), ==, 0xff00ff);
+ g_assert_cmpint (get_pixel (200, 25), ==, 0xff00ff);
/* new shader effect */
- g_assert_cmpint (get_pixel (350, 50), ==, 0x00ffff);
+ g_assert_cmpint (get_pixel (300, 25), ==, 0x00ffff);
*was_painted = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]