[RFC Weston 00/10] Sub-surfaces v2
Pekka Paalanen
ppaalanen at gmail.com
Fri Feb 22 07:07:44 PST 2013
Hi all,
this is a new spin of the sub-surfaces Wayland protocol
extension, v2. The v1 was announced in:
http://lists.freedesktop.org/archives/wayland-devel/2012-December/006844.html
Earlier we have already landed some 14 patches of toytoolkit
restructuring, that was done after v1.
The major changes in v2 are:
- Moved protocol from Wayland to Weston. It is easier to handle
in one place, and will be moved into Wayland core once it is
deemed good enough.
- Protocol documentation is updated. The following requests have
been added to the protocol: wl_subcompositor.destroy,
wl_subsurface.destroy, and most importantly
wl_subsurface.set_commit_mode.
- Clients can now choose between two commit behaviours for
sub-surfaces: parent-cached and independent. These are
explained in the protocol file.
- A totally new demo client presenting sub-surfaces, including
Cairo-image rendered window with a pure EGL/GL widget in a
sub-surface, running independently, but still without glitches
on resize (sans bugs).
http://people.collabora.com/~pq/subsurface-2.png
The biggest improvement over v1 is that we have some thought-out
commit behaviours. It is possible to resize a window so that all
surfaces stay in sync on screen, and it is also possible to have
sub-surfaces running on their own (i.e. without commit the
parent surface, too).
Open issues:
- Does this commit behaviour satisfy all needs?
- Input events still very much unexplored. The demo just punts
them.
- Clipping and scaling of surface content - this will most
likely be a new orthogonal extension altogether, so not really
relevant here.
- What should wl_subsurface.destroy do? Nothing, or reset the
wl_surface's role? Currently it resets the role, since it was
easy to implement.
- Should sub-surface nesting be allowed? I.e. creation of
sub-sub-surfaces etc. What would be semantics be? I have not
really thought about that. Input dispatching within clients
may be a problem.
- wl_shell and other protocols interact with sub-surfaces, and
all interactions have not been resolved yet.
If I forgot any other design issues, let me know, please.
To do, bugs:
- destroying the wl_surface of a wl_subsurface will prevent
destroying the wl_subsurface, fix this, and adjust the
protocol description accordingly
- double-buffering of sub-surface z-order changes
- a demo client with window decorations stitched from 4
non-overlapping sub-surfaces
- fix frame throttling in subsurfaces demo
- fix eglSwapInterval in Mesa (krh?)
- subsurfaces demo behaves strangely under the DRM backend of
Weston, debug and fix it. A timestamp issue?
- even with three buffers in a pool, subsurfaces may still run
out of free buffers. When that happens, "all buffers are held
by the server" error message appears, and sub-surfaces may be
out of sync. Related to frame throttling.
- glitched rendering of the GL widget in subsurfaces when Up or
Down key held pressed, might be related to frame throttling.
- fix full-surface alpha for surfaces that have sub-surfaces
- in subsurfaces demo, put the GL widget into its own thread, so
it is truely as concurrent as it can get.
- reimplement the "black surface" in shell as a sub-surface
The new code can be browsed in:
http://cgit.collabora.com/git/user/pq/weston.git/log/?h=subsurface-v2
Pekka Paalanen (10):
protocol: add sub-surfaces
compositor: introduce sub-surfaces
tests: add sub-surface protocol tests
compositor: add sub-surfaces to repaint list
shell: keyboard focus and restacking fixes for sub-surfaces
window: implement shm triple-buffering
window: create sub-surfaces
window: implement per-surface redraws
clients: add subsurfaces demo
window: prevent EGL sub-surface deadlock
clients/.gitignore | 3 +
clients/Makefile.am | 12 +
clients/subsurfaces.c | 791 ++++++++++++++++++++++++++++++++++++++++++++++++
clients/window.c | 343 ++++++++++++++++++---
clients/window.h | 14 +
configure.ac | 3 +
protocol/subsurface.xml | 214 +++++++++++++
src/.gitignore | 3 +
src/Makefile.am | 4 +
src/compositor.c | 689 ++++++++++++++++++++++++++++++++++++++++-
src/compositor.h | 59 ++++
src/shell.c | 37 ++-
tests/.gitignore | 3 +
tests/Makefile.am | 9 +-
tests/subsurface-test.c | 327 ++++++++++++++++++++
15 files changed, 2437 insertions(+), 74 deletions(-)
create mode 100644 clients/subsurfaces.c
create mode 100644 protocol/subsurface.xml
create mode 100644 tests/subsurface-test.c
This patch series depends on further patches, so you cannot just
apply this series on top of Weston master. I did not include the
other patches, because they are waiting for a rewrite. Instead,
you can use my Weston branch subsurface-v2 which has everything
in place. You do not need any patches for Wayland, you can just
use master of Wayland upstream.
The following changes since commit a4575634f4a1f63430cfc4da5b7ab757f6c33c1c:
compositor: Rename lock and unlock signals to idle and wake (2013-02-21 21:12:45 -0500)
are available in the git repository at:
git://git.collabora.co.uk/git/user/pq/weston.git subsurface-v2
for you to fetch changes up to 2b3f13a2cd8ddadd87b5329e400fcddcb460a046:
window: prevent EGL sub-surface deadlock (2013-02-22 15:47:03 +0200)
When you build it, you should configure Weston with
--with-cairo-glesv2 regardless of whether your Cairo actually
has GLESv2. Otherwise the new subsurfaces demo might not be
built.
Thanks,
pq
--
1.7.12.4
More information about the wayland-devel
mailing list