We default to setting the minimum size to the initial size. To set a
different minimum size than the initial size, set the minimum size first
then then initial size. Good enough for a toy toolkit.
https://bugs.freedesktop.org/show_bug.cgi?id=50263
We don't support this anymore. weston requires a setuid helper (such as
weston-launch) to run under kms, and should never run as root itself.
Disabe the setuid warning in configure.ac since we now only install the
minimal weston-launch as setuid.
surface->damage is for when the contents of the surface changes. Instead,
use weston_surface_damage_below() to repaint the damaged area. We avoid
unecessary uploading shm and hw cursor contents this way.
Instead of having a custom fork of the vpxenc tool in weston, we can
just dump raw YUV data in the YUV4MPEG2 format and feed that into the
upstream vpxenc. This also works with theora_encoder and probably many
other encoders.
We no longer reserve the hw cursor for just the pointer sprite. Any
surface that satisfies the requirements for the hw cursor can be used.
Of course that's more or less always the pointer sprite, but at least now
we don't hard-code the references to compositor->seat anymore.
Determining whether it was possible to use a surface buffer as the
primary framebuffer was always a bit of a hack. Just before rendering,
we look at the second top-most surface to see if it's the right size and
position and then use it if it is. If we have a hw cursor and a drm
plane on top, it's no longer the second top-most and it wouldn't be picked
even if it could work.
With this change, we inspect surfaces in drm_assign_planes and try to find
a candidate for the primary fb there. We track the overlap like for
overlays and if there is a surface that's not overlapped and fills the
output we pick it.
This commit also consolidate the logic to track damage as we move a surface
in and out of the primary plane, which was missing in the drm plane case.
The kms planes support scaling, so try to detect transformations that
are just translations + scaling and program the kms plane accordingly.
In particular, this lets us fullscreen a yuv surfaces with the scale method
and have the compositor use a kms plane for scaling and color conversion.
This lets us create the gbm bo from the wl_buffer instead of the
EGLImage. With planar buffer, the EGLImage corresponds to a plane
and not the entire planar buffer.
More importantly, with some YUV formats (packed YUYV and similar) we use
several EGLImages to sample the different components, but KMS only
want one plane in that case.
It is possible that a client loses the focus between receiving a
pointer.enter event and sending a pointer.set_cursor request. In that
case, the cursor surface might not be mapped and the frame callback
requested on it will never trigger.
Work around this by trying to remap the cursor surface whenever there
is a frame callback and the serial for the enter event is higher than
the cursor serial.
If the grab surface happens to be unresponsive, the busy cursor grab
will be started and that will cause the grab surface to receive focus,
which in turn leads to it being pingged again. Break the cycle by not
sending pings to it. If the shell is unresponsive it won't be able to
set the busy cursor anyway.
Simplify RGB shader code and split off common code that could be reused.
This is preparatory work for YUV shaders.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Make weston_surface::texture and ::surface an array, while keeping
[0] for RGB surfaces.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
It does not get the correct panel height for now. The memeber of list
to read should be layer_link not link now.
Signed-off-by: Juan Zhao <juan.j.zhao@linux.intel.com>
We end up calling shell_configure_fullscreen() from activate(), where
surface->buffer may be NULL. Instead, call it on initial map and
first buffer attach after surface type change. Both code path
come from the surface->configure callback where surface->buffer is know
to be non-NULL.
https://bugs.freedesktop.org/show_bug.cgi?id=51678
window.c:1173:6: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
desktop-shell.c:305:6: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]