touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #90702
[Bug 1475678] [NEW] Unity8 not informing clients that they are not visible and thus can stop rendering
Public bug reported:
Currently on the phone, apps stop rendering when shell hides them,
because shell also lifecycle stops the app. App isn't actually told it
should stop rendering, we just SIGSTOP its process.
But some apps are not lifecycle stopped, e.g. music. So we should have
unity8 tell the app to stop rendering.
This will be a multi-step process:
1. Qtubuntu
Mir has a attribute to set on surfaces to tell them they are visible/occluded: (see mir/include/common/mir_toolkit/common.h)
mir_surface_attrib_visibility - part of the MirSurfaceAttrib enum.
This indicates these possible values:
typedef enum MirSurfaceVisibility
{
mir_surface_visibility_occluded = 0,
mir_surface_visibility_exposed
} MirSurfaceVisibility;
On the client side (qtubuntu), you need to listen for this attribute change, and connect it to QWindowSystemInterface::handleExposeEvent() which tells Qt how much of a QWindow is being drawn.
Note there is also a QWindowSystemInterface::handleWindowStateChanged() handler, which use use to explicitly set QWindow show/hide, but Qt tends to release its GL context on hide, which we may not desire. It may not hurt, worth a look.
2. QtMir
There are methods on mir::scene::Surface to set and get the MirSurfaceAttrib attributes. I think it would make sense to use the pre-existing MirSurfaceItem::visible property, so that if a surface is marked visible=false, then that will dispatch the mir_surface_visibility_occluded event to the client, so it will stop drawing.
3. Unity8
Correctly set visible=false when an application surface is occluded, and true when visible. QML has no automatic way of doing that (i.e. occlusion detection)
** Affects: qtmir
Importance: Undecided
Status: New
** Affects: qtubuntu
Importance: Undecided
Status: New
** Affects: unity8 (Ubuntu)
Importance: Undecided
Status: New
** Also affects: qtubuntu
Importance: Undecided
Status: New
** Also affects: unity8 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity8 in Ubuntu.
https://bugs.launchpad.net/bugs/1475678
Title:
Unity8 not informing clients that they are not visible and thus can
stop rendering
Status in QtMir:
New
Status in qtubuntu:
New
Status in unity8 package in Ubuntu:
New
Bug description:
Currently on the phone, apps stop rendering when shell hides them,
because shell also lifecycle stops the app. App isn't actually told it
should stop rendering, we just SIGSTOP its process.
But some apps are not lifecycle stopped, e.g. music. So we should have
unity8 tell the app to stop rendering.
This will be a multi-step process:
1. Qtubuntu
Mir has a attribute to set on surfaces to tell them they are visible/occluded: (see mir/include/common/mir_toolkit/common.h)
mir_surface_attrib_visibility - part of the MirSurfaceAttrib enum.
This indicates these possible values:
typedef enum MirSurfaceVisibility
{
mir_surface_visibility_occluded = 0,
mir_surface_visibility_exposed
} MirSurfaceVisibility;
On the client side (qtubuntu), you need to listen for this attribute change, and connect it to QWindowSystemInterface::handleExposeEvent() which tells Qt how much of a QWindow is being drawn.
Note there is also a QWindowSystemInterface::handleWindowStateChanged() handler, which use use to explicitly set QWindow show/hide, but Qt tends to release its GL context on hide, which we may not desire. It may not hurt, worth a look.
2. QtMir
There are methods on mir::scene::Surface to set and get the MirSurfaceAttrib attributes. I think it would make sense to use the pre-existing MirSurfaceItem::visible property, so that if a surface is marked visible=false, then that will dispatch the mir_surface_visibility_occluded event to the client, so it will stop drawing.
3. Unity8
Correctly set visible=false when an application surface is occluded, and true when visible. QML has no automatic way of doing that (i.e. occlusion detection)
To manage notifications about this bug go to:
https://bugs.launchpad.net/qtmir/+bug/1475678/+subscriptions
Follow ups
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Michał Sawicz, 2016-02-04
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Nick Dedekind, 2016-01-20
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Pat McGowan, 2016-01-19
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Daniel d'Andrada, 2015-12-03
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Pat McGowan, 2015-12-03
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Michał Sawicz, 2015-11-30
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Pat McGowan, 2015-11-19
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Launchpad Bug Tracker, 2015-11-06
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Jean-Baptiste Lallement, 2015-11-06
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Michał Sawicz, 2015-10-29
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Launchpad Bug Tracker, 2015-09-23
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Michał Sawicz, 2015-09-21
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Michał Sawicz, 2015-09-21
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Pat McGowan, 2015-09-21
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Michael Zanetti, 2015-07-23
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Mirco Müller, 2015-07-21
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Mirco Müller, 2015-07-20
-
[Bug 1475678] Re: Unity8 not informing clients that they are not visible and thus can stop rendering
From: Mirco Müller, 2015-07-17