Switching display mode may happen when:
1. The fullscreen surface is at top most in fullscreen layer and with
"driver" method. Shell will switch output mode to match the surface
size. If no matched mode found, fall back to "fill" method.
2. The top fullscreen surface is destroyed or unset. Switch back to the
origin mode.
Some GL implementations do not provide GL_EXT_read_format_bgra
extension.
Set a glReadPixels format based on whether the extensions is supported
or not, and use that format in all backends.
Add RGBA->BGRA swapping copy to screenshooter to keep the shm buffer
data format as BGRA.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Removing the input devices will trigger events and activity that will cause
a redraw. Do this before we put the compositor to sleep so we can cancel it
properly and avoid immediately waking the compositor again.
We dont want to receive hotplug events while being inactive.
When getting back active we enumerate all devices and would end up
with two sources for one device that may be hotplugged in the mean time.
weston-launch starts weston and provides mechanism
for weston to set/drop drm master, open a tty,
and read input devices without being root.
Execution is allowed for local-active sessions
or users in the group weston-launch.
The remaining use case was making our context current before we had any
output surfaces. We can do that now using a dummy surface, so let's stop
relying on surfaceless.
Instead of using the hacks of gbm_bos, EGLImage, FBOs and surfaceless
we switch to using the new gbm surface API. This gives us an EGL
native window type for gbm and lets us use a real EGL surface.
On one hand, getopt (in particular the -o suboption syntax) sucks on the
server side, and on the client side we would like to avoid the glib
dependency. We can roll out own option parser and solve both problems
and save a few lines of code total.
Udev provides a convenient helper. Use it instead of working with the
property-list directly.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
If we have multiple video devices on the system (card0, card1), we should
ignore hotplug events for cards that we do not use. This avoids calling
update_outputs() if the event was not generated by our device so we avoid
refreshing the DRM information if it didn't change.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
When creating outputs in the drm compositor, if allocating crtcs
fails, then free the drm resources. Also, if the base output list is
empty, free drm resources
DPMS kicks in only when wscreensaver is launched, in the moment that shell
call lock() for the second time. Backlight control internals are managed by
libbacklight:
http://cgit.freedesktop.org/~vignatti/libbacklight/
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
This allows each output back end to optimize drawing using overlay planes
and cursors (yet to be integrated). If a surface is assigned to a
plane, the back end should clear its damage field so that the later
repaint code won't look at it.
weston_surface::transform.boundingbox depends on width and height, and
therefore geometry.dirty flag, so move width and height into geometry.
Fix all users and check that the dirty flag is set.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
Not sure this check belongs here, but as the position checks are here
too, I added this. Just so we don't forget.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
weston_surface::transform.position depends on x,y, and therefore the
dirty flag, so move x and y into geometry.
Also add the missing dirty flags.
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
We've trimmed down the actual repaint loop to just iterating through the
surface list and calling weston_surface_draw(), so we push that to the
backend without too much code duplication.
gbm_bo_create_from_egl_image() should catch this based on the
GBM_BO_USE_CURSOR_64X64 flag. It currently doesn't so we end up with
a cursor buffer with invalid stride.
If we don't cancel the repaint, we end up pointlessly redrawing the output.
What's worse is that pageflipping to the new buffer eventually fails and
we miss the finish_frame callback, leaving the compositor stuck when we
re-enter the vt.
Normally the repaint will trigger a pageflip, which flips back to our
fb, but that doesn't work if the kms output has been turned off or
set to a different mode.