The shell module only needs to deal with attach when it's either the initial
attach or when the attach changes the size of the surface. In case of
initial attach, the shell needs to pick a position for the surface and a
place in the surface stack. We split this case out as a new shell->map
callback. The other case is split into the shell->configure callback,
where the shell may adjust the surface position or reject the new size.
The drm compositor always creates a 64x64 bo for the cursor image
regardless of the size of the actual cursor. When the fade animation
kicks in it disables the hardware cursor so that it is rendered as a
regular surface. This surface is rendered to a 32x32 region but using
a 64x64 texture so the cursor gets scaled down.
Fix this by making create_cursor_image return the actual size of the
image created to the compositor.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
If the current or pending scanout buffer is destroyed, the client frame
will remain being displayed until something else causes a repaint to be
scheduled.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
wlsc_output_repaint may call wlsc_surface_damage indirectly through
wlsc_output_set_cursor. If this happens in the call made from repaint,
one ends up with repaint being called from both idle_repaint and
wlsc_output_finish_frame.
Fix this by setting output->repaint_scheduled to 1 before calling
wlsc_output_repaint in the function repaint.
[krh] Edited to just only clear repaint_scheduled, when we no longer have
a repaint scheduled.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
On repaint, wlsc_output_repaint will replace output->scanout_buffer with
the new front buffer and then output->present() will cause this buffer
to be displayed. When wlsc_output_finish_frame is called, the
compositor will send a release buffer event for output->scanout_buffer
which is actually the front buffer now.
This patch changes this code to release the previous scanout_buffer
instead of the front buffer on wlsc_output_finish_frame.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Move this to a separate function to better accommodate changes in the
following commit.
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
The files in question are copyright Benjamin Franzke (who agrees),
Intel Corporation, Red Hat and myself. On behalf of Red Hat,
Richard Fontana says:
"Therefore, to the extent that Red Hat, Inc. has any copyright
interest in the files you cited as of this date (compositor-drm.c,
compositor.c, compositor.h, screenshooter.c in
http://cgit.freedesktop.org/wayland/wayland-demos/tree/compositor),
Red Hat hereby elects to apply the CC0 1.0 Universal Public Domain
Dedication to such copyrighted material. See:
http://creativecommons.org/publicdomain/zero/1.0/legalcode .
Thanks,
Richard E. Fontana
Open Source Licensing and Patent Counsel
Red Hat, Inc."
The compositor was never actually calling the output backend to turn off
the hardware cursor when the screen begins fading. This would result in
a stuck hardware cursor and movable software cursor for the duration of
the fade/unfade.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Adds a general wlsc_compositor_shutdown() function that all output
backends call when shutting down. wlsc_compositor_shutdown() will call
a new 'destroy' method of each output to perform backend-specific
cleanup (e.g., turning off the hardware cursor in the DRM compositor).
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
texture_region was getting a trash value for computing. I don't
understand how we couldn't see any artifact on surface output in such
case.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>