framebuffer_session: add sync_source selection

The new Framebuffer::Session::sync_source RPC function allows for the
selection of a specific source of sync signals in the presence of
multiple capture clients at the GUI server.

This patch contains only the extension of the interface. The information
is not evaluated by the GUI server yet.

Issue #5347
This commit is contained in:
Norman Feske 2024-09-26 13:45:45 +02:00 committed by Christian Helmuth
parent 5b4e1915d8
commit e69c01aad3
6 changed files with 25 additions and 1 deletions

View File

@ -264,6 +264,8 @@ class Framebuffer::Session_component : public Genode::Rpc_object<Session>
_timer.trigger_periodic(10*1000);
}
void sync_source(Session_label const &) override { }
void refresh(Rect rect) override
{
_window_content.redraw_area(rect.x1(), rect.y1(), rect.w(), rect.h());

View File

@ -290,6 +290,8 @@ class Gui_fader::Framebuffer_session_component
{
_gui.framebuffer.sync_sigh(sigh);
}
void sync_source(Genode::Session_label const &) override { }
};

View File

@ -32,6 +32,8 @@ struct Framebuffer::Session_client : Rpc_client<Session>
void sync_sigh(Signal_context_capability sigh) override { call<Rpc_sync_sigh>(sigh); }
void sync_source(Session_label const &source) override { call<Rpc_sync_source>(source); }
void refresh(Rect rect) override { call<Rpc_refresh>(rect); }
/**

View File

@ -210,6 +210,19 @@ struct Framebuffer::Session : Genode::Session
*/
virtual void sync_sigh(Signal_context_capability) = 0;
/**
* Define the preferred source of sync signals
*
* In the presence of multiple capture clients at the GUI server, each
* client captures the GUI at independent refresh rates. Hence, there is
* no single source of sync signals but there can be multiple. From the
* application's perspective, the most adequate sync source may depend on
* the positions of the capture clients at the GUI server and the position
* of the application's view. By specifying a capture client's label as
* 'sync_sigh', the application can take an informed decision.
*/
virtual void sync_source(Session_label const &) = 0;
/*********************
** RPC declaration **
@ -222,9 +235,10 @@ struct Framebuffer::Session : Genode::Session
GENODE_RPC(Rpc_panning, void, panning, Point);
GENODE_RPC(Rpc_mode_sigh, void, mode_sigh, Signal_context_capability);
GENODE_RPC(Rpc_sync_sigh, void, sync_sigh, Signal_context_capability);
GENODE_RPC(Rpc_sync_source, void, sync_source, Session_label const &);
GENODE_RPC_INTERFACE(Rpc_dataspace, Rpc_mode, Rpc_mode_sigh, Rpc_refresh,
Rpc_blit, Rpc_panning, Rpc_sync_sigh);
Rpc_blit, Rpc_panning, Rpc_sync_sigh, Rpc_sync_source);
};
#endif /* _INCLUDE__FRAMEBUFFER_SESSION__FRAMEBUFFER_SESSION_H_ */

View File

@ -238,6 +238,8 @@ struct Framebuffer::Session_component : Genode::Rpc_object<Framebuffer::Session>
_gui.framebuffer.sync_sigh(sigh);
}
void sync_source(Session_label const &) override { }
};

View File

@ -113,6 +113,8 @@ class Framebuffer::Session_component : public Rpc_object<Session>
_sync_sigh = sigh;
}
void sync_source(Session_label const &) override { }
void refresh(Rect) override;
Blit_result blit(Blit_batch const &) override;