desktop-shell: do not black out with startup "none"
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 26 May 2015 08:54:52 +0000 (11:54 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 26 May 2015 12:43:02 +0000 (15:43 +0300)
Do not use a black blanket surface when the startup animation is
specified to be "none". This is the final fix needed to make the
screenshot test deterministic and independent of weston-desktop-shell.

Previously, the black surface would cover all outputs until
weston-desktop-shell signalled ready. Then, depending on the set
animation, either the black surface was immediately removed (none) or a
fade-in started (fade).

Now, when there is no black surface at all for "none", the compositor
will show garbage until weston-desktop-shell gets everything up. This
may be undesireable but works for tests. To have the old "none"
behaviour back, I would propose to add a new startup-animation value
"black" for it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-By: Derek Foreman <derekf@osg.samsung.com>
desktop-shell/shell.c

index 8c37963a20075be13f47c38b40651e372b1cd9a1..fe620cb8f231bef184f1894178d09ffff479f80b 100644 (file)
@@ -5353,9 +5353,12 @@ do_shell_fade_startup(void *data)
 {
        struct desktop_shell *shell = data;
 
-       if (shell->startup_animation_type == ANIMATION_FADE)
+       if (shell->startup_animation_type == ANIMATION_FADE) {
                shell_fade(shell, FADE_IN);
-       else if (shell->startup_animation_type == ANIMATION_NONE) {
+       } else {
+               weston_log("desktop shell: "
+                          "unexpected fade-in animation type %d\n",
+                          shell->startup_animation_type);
                weston_surface_destroy(shell->fade.view->surface);
                shell->fade.view = NULL;
        }
@@ -5401,6 +5404,9 @@ shell_fade_init(struct desktop_shell *shell)
                return;
        }
 
+       if (shell->startup_animation_type == ANIMATION_NONE)
+               return;
+
        shell->fade.view = shell_fade_create_surface(shell);
        if (!shell->fade.view)
                return;