Commit Graph

71 Commits

Author SHA1 Message Date
Scott Moreau 7c8b116065 simple-shm: Handle ping event.
Since simple-shm does not use toytoolkit, it needs to respond to ping events so it is not deemed unresponsive.
2012-05-14 10:02:12 -04:00
Pekka Paalanen c3710f2379 simple-shm: no need for wayland-egl.h
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-26 15:45:13 +03:00
Pekka Paalanen 3baf946b9a simple-shm: handle shm buffer failure
Do not segfault, if creating the shm buffer fails.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-26 15:44:45 +03:00
Pekka Paalanen 313bd84a48 simple-shm: render meaningful diagnostics
Previously, simple-shm was rendering an image that looked like stride
gone wrong somewhere, and was quite confusing if you did not know it was
supposed to look like that.

Replace the drawing code. Two circles, inner and outer, now delimit
three co-centric areas. The outmost area from surface borders to outer
circle contains horizontal gradients that move (animate) to the left.
The area between outer and inner circles contains vertical gradients
that move upwards. The center disc has circular gradients moving towards
the center.

The circles are not ellipses.

Diagnostics:
The X-channel is manipulated so, that if a compositor takes the XRGB
image, and uses the X channel as alpha instead of ignoring it, the whole
image will be crossed out by two lines that either quickly saturate to
white or show through with additive blending. Does not work on black
background.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2012-04-26 15:42:05 +03:00
Kristian Høgsberg 16626282fd clients: Use new shm interface 2012-04-03 11:22:06 -04:00
Kristian Høgsberg 9629fe3206 Simplify shm buffer handling
There was a lot of code here to do a lot of work we didn't need to do.
If we damage a surface with a shm buffer attached, all we need to do
is to re-upload the damaged region to the texture.  As for drm buffers,
we don't assume anything changes on attach and only update the
regions the client tells us to update in the damage request.
2012-03-26 19:27:35 -04:00
Kristian Høgsberg fcfc83f6ae clients: Use wl_display_disconnect() 2012-02-28 14:34:54 -05:00
Kristian Høgsberg 8e81df4503 Use new format codes 2012-01-11 14:24:46 -05:00
Pekka Paalanen fb850c4e0f simple clients: flush before destroying wl_display
Flush our pending destroy requests to the server before destroying the
wl_display.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:50 +02:00
Pekka Paalanen c4cd62acee simple-shm: implement destructors
Implement proper destructors that call the wayland destroy functions.

With this and the "client: fix a strdup memory leak" patch in Wayland
core, simple-shm now runs Valgrind-clean (memcheck).

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:50 +02:00
Pekka Paalanen 88e60fc2ba simple clients: add signal handler for clean exit
Add signal handler for SIGINT to simple-egl and simple-shm, so they can
be exited voluntarily, without killing them. Later we can add clean-up
code and destructors, and check with valgrind for leaks and errors.

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-22 11:27:50 +02:00
Pekka Paalanen 9d1613eb4a wl_shell_surface adaptation
Protocol changes in Wayland core introduced a new interface
wl_shell_surface, and moved all wl_shell surface methods into it. Adapt
the compositor and its Wayland backend, shell plugin, and all clients to
the new interface.

Depends on the Wayland core commit "protocol: introduce wl_shell_surface"

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
2011-12-04 14:54:26 -05:00
Kristian Høgsberg a3cdf59cee simple-shm: Add a wl_shm listener
This way we properly check that WL_SHM_FORMAT_XRGB32 is available.
2011-11-17 10:27:17 -05:00
Kristian Høgsberg f389cacc20 Move away from visuals and just use EGLConfigs or shm format tokens 2011-08-31 16:21:38 -04:00
Kristian Høgsberg 2821aaaf9c simple-shm: Fix inverted logic 2011-08-29 17:12:37 -04:00
Kristian Høgsberg 2415990461 clients: Remove a few unused variables 2011-08-29 17:12:36 -04:00
Kristian Høgsberg f790c79ec7 Use wl_display_bind() for binding to globals 2011-08-29 17:12:36 -04:00
Kristian Høgsberg 334182062f Use the new wl_callback interface 2011-08-29 17:12:36 -04:00
Tiago Vignatti e81fe8346c clients: simple-shm: remove unused libraries and headers
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2011-07-21 08:42:58 -07:00
Tiago Vignatti 79caa757c9 simple-shm: assert display conection
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
2011-07-21 08:42:58 -07:00
Kristian Høgsberg 97ba2e6015 clients: Add a simple shared memory client 2011-07-06 11:58:45 -04:00