Cursor images are fairly small and having one pool for each image adds
a lot of unnecessary overhead. Instead, create one large pool and
allocated all cursor images from that.
In order to do that, however, the code that creates shm surface needed
some refactoring. This patch adds a new struct shm_pool that is used
by the cursor and also changes struct window to use it.
Simple clients were relying on AM_CFLAGS and AM_CPPFLAGS set for
toytoolkit clients. With toytoolkit clients disabled, the build fails
with missing wayland-client.h.
Move AM_CFLAGS and AM_CPPFLAGS outside of conditional sections, since
they are meant to be global settings.
Let simple clients override AM_CPPFLAGS with their own
SIMPLE_CLIENT_CFLAGS, which the configure script already sets up for us,
but was unused until now.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
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>
These new protocol events allow us to tell which outputs a surface is on, and
potentially update where we allocate our buffers from.
Signed-off-by: Casey Dahlin <cdahlin@redhat.com>
Updates the .gitignore files for clients and tests to reflect a new test and a
couple of renamed applications.
Signed-off-by: Casey Dahlin <cdahlin@redhat.com>
lockscreen, homescreen and shell launchers are falling back okay already and
only lockscreen icon was missing some way to keep the shell client running in
the absence of images. This patch fix it.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
The biggest performance bottleneck while resizing is the continous
setting up and tearing down of mmaps and faulting in pages. This commit
introduces a per-window pool that we'll allocate buffers out of if it's
available. Then we set initialize it to a big shm pool when we start
resizing and free it when resizing is done.
A couple of fixes were made: Weston tablet-shell needed to use weston_layer,
so the compositor could rebuild the surface list correctly when repainting;
homescreen and locking are using the widget + window abstration of toytoolkit;
and widget_set_redraw_handler are being set for widgets redraw.
Also, it was given some basic meaning for lockscreen_button_handler, which
was completely disabled before. As a clean up, I updated the global listener
mechanism on tablet-shell client, using the regular way of registering a
handler instead wl_display_roundtrip -> wl_display_get_global.
Switcher still without code to proper work and the same for tablet-shell
clients, which are not launched.
krh: Edited to not scale down homescreen icons, use new load_cairo_surface()
for image loading.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
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.
This makes the compositor and demo clients work on the current nouveau
nvfx driver. Obviously does not fix any clients that actually want a
depth buffer, but this does allow more people to at least try wayland.