- Aug 14, 2015
-
-
v2: - adapted to protocol changes - added TODO comments - minor clean-up - change y-invert from per-plane boolean to per-buffer flag v3: - fix a typo: 1 -> i (noticed by Carlos Olmedo Escobar) Signed-off-by:
George Kiagiadakis <george.kiagiadakis@collabora.com> Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Acked-by:
Daniel Stone <daniels@collabora.com>
-
Pekka Paalanen authored
v2: - add TODO note about multi-planar import and how we should do it Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Pekka Paalanen authored
v2 changes: - only initialize linux_dmabuf if renderer supports it Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Pekka Paalanen authored
v2 changes: - only initialize linux_dmabuf if renderer supports it Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Pekka Paalanen authored
Import dmabuf as an EGLImage, and hold on to the EGLImage until we are signalled a content change. On content change, destroy the EGLImage and re-import to trigger GPU cache flushes. We hold on to the EGLImage as long as possible just in case the client does other imports that might later make re-importing fail. As dmabuf protocol uses drm_fourcc codes, we need libdrm for drm_fourcc.h. However, we are not doing any libdrm function calls, so there is no new need to link to libdrm. RFCv1 changes: - fix error if dmabuf exposed unsupported - always use GL_TEXTURE_EXTERNAL_OES with dmabuf v2 changes: - improve support check and error handling - hold on to the imported EGLImage to avoid the dmabuf becoming unimportable in the future - send internal errors with linux_dmabuf_buffer_send_server_error() - import EGL_EXT_image_dma_buf_import extension headers - use heuristics to decide between GL_TEXTURE_2D and GL_TEXTURE_EXTERNAL_OES - add comment about Mesa requirements - change y-invert from per-plane boolean to per-buffer flag Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
This is a reference-counted holder of an EGLImage. For now, direct EGLImage usage is simply converted to use egl_image. Use of reference counting will come in a later patch. v2: - this is a new patch, split from gl-renderer dmabuf import support Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Pekka Paalanen authored
v2 changes: - implement the revised protocol - add basic sanity checks when creating buffer and check for support - add way to attach user data to the dmabuf for renderer use - bump max number of planes to 4 to follow DRM AddFb2 ioctl - improve errors handling - use separate linux_dmabuf_buffer fields for the different wl_resource types - as SERVER_ERROR code is no more, use a wl_display "generic" error for emergency-disconneting a client we fail to process - more documentation - change y-invert from per-plane boolean to per-buffer flag Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
Pekka Paalanen authored
An experimental (hence the 'z' prefix) linux_dmabuf Wayland protocol extension for creating dmabuf-based wl_buffers in a generic manner. This does not include proper dmabuf metadata negotiation because there is no way to communicate all dmabuf constraints from the compositor to a client before-hand. The client has to create a wl_buffer wrapping one or more dmabuf buffers and then listen at the feedback object returned to know if the operation was successful. RFCv1 changes (after a first draft without code): - some renames of interfaces and argument, no semantic changes - added destructor protocol to dmabuf_batch - added feedback interface for buffer creation v2 changes: - use drm_fourcc.h as authoritative source for format codes - add support for the 64-bit layout qualifier and y-inverted dmabufs - simplify the 'add' request (no need to preserve fd numerical id) - add explicit plane index in the 'add' request - integrate the 'feedback' object events to the batch interface - rename 'create_buffer' to 'create' and move it into the batch interface - add requirements needed from the graphics stack and clients - improve existing errors and add batch error codes - removed error codes from the global interface - improve documentation for arguments, enums, etc. - rename dmabuf_batch to zlinux_buffer_params - The y-inverted property makes more sense as a whole buffer property. Y-flipping individual planes of the same buffer object is hardly useful. The y-invert is also converted into a flag, so we may add more flags later. - add flags for interlaced buffer content v3 changes: - Apply Daniel Vetter's comments about wording on coherency. Signed-off-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by:
Louis-Francis Ratté-Boulianne <lfrb@collabora.com> Reviewed-by:
Daniel Stone <daniels@collabora.com> Acked-by:
Benjamin Gaignard <benjamin.gaignard@linaro.org> Reviewed-by:
Daniel Vetter <daniel.vetter@ffwll.ch>
-
- Aug 10, 2015
-
-
Dawid Gajownik authored
According to POSIX standard "upon successful completion, putenv() shall return 0; otherwise, it shall return a non-zero value." Unlike in setenv() we should not be checking only for negative values. Signed-off-by:
Dawid Gajownik <gajownik@gmail.com>
-
- Aug 07, 2015
-
-
Dawid Gajownik authored
When the output can't be completely created in the backend (for example lack of memory), weston_compositor_add_output() is never run. In such a case output->link is not initialized. Letter, when weston_output_destroy() is called, application crashes on wl_list_remove(&output->link). This problem happens when drm, fbdev, rdp, rpi or wayland backend is used. v2: Initialize output->link in weston_output_init() as suggested by Derek Foreman. Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
Jason Ekstrand authored
Previously, we blindly created a mode for the output based on surface size and completely ignoring the output transform. This caused modesets to fail on outputs that were transformed by 90 or 270 degrees. We should be swapping the width and the height in this case. Reviewed-by:
Derek Foreman <derekf@osg.samsung.com> Tested-by:
Derek Foreman <derekf@osg.samsung.com>
-
Derek Foreman authored
If we destroy all the devices before trying to remove keyboard focus we'll segfault because we destroyed the keyboard. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Ryo Munakata <ryomnktml@gmail.com> Reviewed-by:
Bryce Harrington <bryce@osg.samsung.com>
-
Dawid Gajownik authored
- opening braces are on the same line as the if statement - opening braces are not on the same line as the function name - space between for/while/if and opening parenthesis Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
Ryo Munakata authored
Signed-off-by:
Ryo Munakata <ryomnktml@gmail.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
- Aug 06, 2015
-
-
When we get a focus in event from an X window which is not the one we last set as the active window, reset the focus. Reviewed-by:
Bryce Harrington <bryce@osg.samsung.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
We already do this math in compositor.c so let's not duplicate it here. Additionally, the copy here has broken zoom, so this also fixes zooming. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Acked-by:
Daniel Stone <daniels@collabora.com>
-
Valgrind has shown that in at least one place (default_grab_pointer_focus) we're testing uninitialized values coming out of weston_compositor_pick_view. This is happening when default_grab_pointer_focus is called when there is nothing on the view list, and during the first repaint when only the black surface with no input region exists. This patch adds a function to clear pointer focus and also set the sx,sy co-ordinates to a sentinel value we shouldn't compute with. Assertions are added to make sure any time pointer focus is set to NULL these values are used. weston_compositor_pick_view() now returns these values too. Now the values are always initialized, even when no view exists, and they're initialized in such a way that actually doing computation with them should fail in an obvious way, but we can compare them safely for equality. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
This seems like a good idea for consistency that the protocol header is included for any protocols used by the code. This also means the code will compile with headers generated by wayland-scanner -c. Fixed to use angle brackets. Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
This makes it consistent with the pointer grab, which also gets global coordinates and not surface relative ones, and allows to easily filter out gestures based on compositor global hotspots. Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
In weston_compositor_create, we initialize output_list. After that we call weston_compositor_schedule_repaint which just calls weston_output_schedule_repaint on all elements of output_list. This call does nothing obviously. So we remove it. Signed-off-by:
Ryo Munakata <ryomnktml@gmail.com> Reviewed-by:
Guilio Camuffo <guiliocamuffo@gmail.com>
-
An earlier patch made surface_resize() and surface_move() take pointers instead of seats, this updates the weston_shell_interface resize and move to match. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
This allows to close the remaining issue in https://bugs.freedesktop.org/show_bug.cgi?id=91390 Reviewed-by:
Daniel Stone <daniels@collabora.com>
-
drm, fbdev, rpi and wayland backends are unnecessarily destroying renderer and output before executing weston_compositor_shutdown() Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
When something goes wrong during weston initialization, weston_compositor_destroy() is executed. It destroys the backend and then frees compositor memory. Unfortunately RDP backend is not correctly destroyed. It frees compositor instead of a backend memory. This causes later a double free error. The easiest way to reproduce a problem is to run weston with an invalid option. Additionally some other objects of rdp_backend structure are not destroyed/freed. The patch fixes both issues. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91457 v3: comply with Weston coding style, this time for real v2: comply with Weston coding style Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
David FORT <contact@hardening-consulting.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
Keyboards and pointers aren't freed when devices are removed, so we should really be testing keyboard_device_count and pointer_device_count in most cases, not the actual pointers. Otherwise we end up with different behaviour after removing a device than we had before it was inserted. This commit makes screen-share.c compile once again after changes in commit 1281a36e. Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
Derek Foreman <derekf@osg.samsung.com>
-
This prevents a use after free when the surfaces are automatically cleaned up later, as shell_client's freed node was still in the surface list. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Acked-by:
Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-
- Aug 02, 2015
-
-
Dawid Gajownik authored
There's no need to check if a pointer exists before passing it to free(). free() can handle NULL pointers. Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-By:
David FORT <contact@hardening-consulting.com>
-
- Jul 31, 2015
-
-
Dawid Gajownik authored
For better readability of `weston --help' output, backends are now sorted in alphabetical order. Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
Bryce Harrington <bryce@osg.samsung.com>
-
Dawid Gajownik authored
Fixes incorrect commit d9563790 Signed-off-by:
Dawid Gajownik <gajownik@gmail.com>
-
Derek Foreman authored
Keyboards and pointers aren't freed when devices are removed, so we should really be testing keyboard_device_count and pointer_device_count in most cases, not the actual pointers. Otherwise we end up with different behaviour after removing a device than we had before it was inserted. This commit renames the touch/keyboard/pointer pointers and adds helper functions to get them that hide this complexity and return NULL when *_device_count is 0. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Jonas Ådahl <jadahl@gmail.com>
-
Derek Foreman authored
We should be testing device counts, not pointers. The pointers are persistent state that never gets freed, and are an inaccurate indicator of device presence after the last release. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Jonas Ådahl <jadahl@gmail.com>
-
Derek Foreman authored
We should be testing device counts, not pointers. The pointers are persistent state that never gets freed, and are an inaccurate indicator of device presence after a release. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Jonas Ådahl <jadahl@gmail.com>
-
Derek Foreman authored
seat->keyboard_focus_listener.link isn't a head, it's just sometimes a member of the focus signal list. Calling wl_list_init() on it puts a loop in the list. Instead, we remove the item then init it. That way we can call remove on it again later even if it hasn't been re-added to a list. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Jonas Ådahl <jadahl@gmail.com>
-
Derek Foreman authored
We shouldn't be using seat->pointer|keyboard|touch here, we should be testing *_device_count to see if a device is currently present. Testing the pointers directly will result in incorrectly advertising capabilities after all devices of a type have been removed. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Jonas Ådahl <jadahl@gmail.com>
-
Dawid Gajownik authored
Hi, after running configure with "Enable developer documentation" set to "yes" git status warns about two new untracked files: doc/doxygen/tooldev.doxygen doc/doxygen/tools.doxygen Below is a small patch. HTH, Dawid
-
Dawid Gajownik authored
`--env-socket' option is of type WESTON_OPTION_BOOLEAN, not WESTON_OPTION_STRING. Socket should be defined in RDP_FD environment variable. Signed-off-by:
Dawid Gajownik <gajownik@gmail.com> Reviewed-by:
Bryce Harrington <bryce@osg.samsung.com>
-
Bryce Harrington authored
-
- Jul 30, 2015
-
-
Derek Foreman authored
Track the seat that initiated a seat instead of picking the first one. Previously, if there are multiple seats then any seat can adjust the zoom level but the zoom tracks the first seat's pointer. Now the zoom will follow the pointer of the seat that initiated the zoom. Additionally, if there's no pointer in the first seat, starting a zoom with the second seat will no longer crash weston. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com>
-
Derek Foreman authored
No longer call weston_output_update_zoom() when trying to zoom out on an unzoomed output. Add an assert() to make sure update_zoom is never called without an active zoom. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com>
-
Derek Foreman authored
It doesn't do anything with a pointer, and zoom can be initiated by the keyboard, so the name was a little confusing. Signed-off-by:
Derek Foreman <derekf@osg.samsung.com> Reviewed-by:
Bryce Harrington <bryce@osg.samsung.com>
-