Commit graph

6 commits

Author SHA1 Message Date
Martin Gräßlin
9b8e9c2e89 Drop KWIN_ from include guards 2014-09-17 16:20:56 +02:00
Martin Gräßlin
a8c7c16c94 Use namespace KWayland::Server instead of KWin::WaylandServer
It's no longer part of KWin.
2014-09-17 16:10:38 +02:00
Martin Gräßlin
3c87cea7a8 Change to LGPLv2+
I'm the only copyright holder of the code in this repository, thus
I can change from GPL to LGPL!
2014-09-17 15:57:56 +02:00
Martin Gräßlin
5e54a86d5e Generate export headers and use it in our headers
Auto tests are adjusted to link against the library instead of compiling
the source files.
2014-09-17 15:10:43 +02:00
Martin Gräßlin
76cb898c7f [kwin_wayland] Add support for shm buffers in server module
The Display provides a method to create the shm pool and a
BufferInterface class is added to the server module. It is created
from the SurfaceInterface when a buffer gets attached to the surface.
The BufferInterface can be referenced and once its unreferenced it
sends a buffer release to the client and destroys itself.

For the case that the buffer is a shm buffer the BufferInterface
provides a convenience method to turn it into a QImage.

The auto test for Surface is extended by attaching buffers to the
surface and verifying that the content is correct.
2014-09-02 09:52:16 +02:00
Martin Gräßlin
992d210e86 [kwin_wayland] Add CompositorInterface and SurfaceInterface
As far as it's currently possible to implement. CompositorInterface is
able to create a surface and emits the created SurfaceInterface. It
does not yet support regions.

The SurfaceInterface is already more complete. It keeps track of the
double buffered states and emits signals when one of the values are
changed after the committing. It supports frame callbacks and has a
hook to mark the frame as rendered.

What's still missing are the regions (as it's not implemented in
CompositorInterface) and attaching the buffer as we do not yet support
creating shm buffers and pools.

The client side test is changed to use our own server and extended to
test damage and frame callback. The test needs to be extended for scale
and transform, but that is still missing in the client side
implementation.
2014-09-02 09:52:16 +02:00