Passing the backend as a parameter to the weston_backend function
pointers seems more natural and will be very useful once there can be
more than one backend.
Since all backends already store a pointer to the compositor instance,
replace the compositor parameter with the backend in all functions.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Fix the incorrect fb_pool stride set in vnc_switch_mode.
Also replace nvnc_fb_pool_unref/new with nvnc_fb_pool_resize.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Add an explicit request to the backend config to choose the renderer.
Currently, only Pixman remains supported, with auto defaulting to that.
Signed-off-by: Daniel Stone <daniels@collabora.com>
When the output is moved, move its per-framebuffer accumulated damage
with it. The alternative would be to track accumulated damage in the
local output coordinate system, but that would require translating back
into global coordinates for repaint_output.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Compositor code can use opaque pointer comparison to determine whether
a head belongs to a given backend. Store a backend pointer in struct
weston_head to enable the compositor to select the correct backend
specific output configuration code.
This also allows to use the backend pointer instead of the opaque
backend_id pointer to check whether a head belongs to a backend, so
replace the checks in all to_xyz_head() functions and drop backend_id.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
No output is created at this point. Even if an output existed,
it should be relased when the head ist destroyed.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
vnc_ensure_matching_mode() does not transfer flags from init_mode.
Set flags on the returned mode instead.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Let xzalloc warn and abort when running out of memory.
With this, vnc_insert_new_mode() and vnc_ensure_matching_mode() can not
return NULL anymore. Remove the now unnecessary error handling.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Let xzalloc warn and abort when running out of memory.
With this, vnc_head_create() doesn't need an error return value anymore.
Remove the now unnecessary error handling.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Let xzalloc warn and abort when running out of memory and remove the
now unnecessary error handling.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Let VNC clients authenticate using the local username and password of
the user weston is running as. To avoid transmitting the password in
cleartext, make TLS security mandatory.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
This adds basic VNC protocol support using the Neat VNC library
(https://github.com/any1/neatvnc). Neat VNC depends on the AML main
loop library. The backend makes use of AML's integrated epoll backend
and connects AML via file descriptor with the Wayland event loop.
This implementation does not support authentication and hardcodes the
pixel format currently.
Co-authored-by: Philipp Zabel <p.zabel@pengutronix.de>
Co-authored-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Stefan Agner <stefan@agner.ch>
[r.czerwinski@pengutronix.de:
- use new (as of 0.5.0) Neat VNC buffer API, with a buffer pool]
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
[p.zabel@pengutronix.de:
- transform repaint damage to output coordinates
- transform pointer coordinates into global space
- check that outputs and heads are in fact ours, see aab722bb1785..060ef82d9360
- track damage across multiple frame buffers
- choose pixel format by drm_fourcc, see 8b6c3fe0ad
- enable ctrl and alt modifiers
- fix frame timing to achieve a constant repaint rate
- pass initial size explicitly, see f4559b0760
- use resize_output with pixman-renderer, see 55d08f9634e8..84b5d0eb4bee
- allow configuring the refresh rate]
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>