[Spice-devel] [PATCH spice-protocol 02/12] seamless-mode: Add support for single window changes

Jakub Janků janku.jakub.jj at gmail.com
Wed Aug 9 11:38:45 UTC 2017


On Wed, Aug 9, 2017 at 9:51 AM Frediano Ziglio <fziglio at redhat.com> wrote:

> >
> > Agent can now send just the coordinates of the window that has changed.
> > In the case window has been hidden or closed, width of the window must be
> > set to 0.
> >
> > This reduces CPU load because the agent doesn't have to cycle through
> all the
> > windows and decide which to send. It mainly concerns Windows agent as
> there
> > are often hundreds of windows and majority of them is not visible to the
> > user.
>
> So basically you can trace single windows events and send the update
> instead of enumerating all windows in the system every time, right?
>

Correct. On Windows, the client receives the complete list after the
request to enable seamless mode and afterwards receives only single window
updates, never the whole list.
It works very similarly on linux, but the list is re-sent after each
destroy event (turns out the window passed to the function with the event
is not the visible one, needs further investigation).

>
> Potentially the old way could be used to send not rectangular windows
> splitting the windows in different rectangles while with this change
> is harder to achieve this.
>

If you mean by non-rectangular windows the same as Marc-André - windows
with rounded corners, then I don't see how this would help. How would you
split these?

>
> > ---
> >  spice/vd_agent.h | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/spice/vd_agent.h b/spice/vd_agent.h
> > index 235f152..056817a 100644
> > --- a/spice/vd_agent.h
> > +++ b/spice/vd_agent.h
> > @@ -93,6 +93,7 @@ enum {
> >      VD_AGENT_AUDIO_VOLUME_SYNC,
> >      VD_AGENT_SEAMLESS_MODE,
> >      VD_AGENT_SEAMLESS_MODE_LIST,
> > +    VD_AGENT_SEAMLESS_MODE_CHANGE,
> >      VD_AGENT_END_MESSAGE,
> >  };
> >
> > @@ -258,6 +259,7 @@ typedef struct SPICE_ATTR_PACKED
> > VDAgentSeamlessModeWindow {
> >      int32_t y;
> >      uint32_t w;
> >      uint32_t h;
> > +    uint64_t id;
> >  } VDAgentSeamlessModeWindow;
> >
>
> This changes also mode_list message. Not a big deal as 01/12 is not
> merged too. But how is the id used in mode_list?
>

The list could be removed, being replaced by sending a batch of individual
windows.

I suppose id is xid on Xwindows and the handle in Windows.
>

Yes, these should not change during the lifetime of a window afaik.

>
> >  typedef struct SPICE_ATTR_PACKED VDAgentSeamlessModeList {
>
> Frediano
>

Regards,
Jakub Janků
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170809/23e92e93/attachment-0001.html>


More information about the Spice-devel mailing list