Commit Graph

14 Commits

Author SHA1 Message Date
Qiang Yu
535b1b3572 red-qxl: add spice_qxl_gl_scanout2
For multi plane support.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2025-04-25 08:26:39 +01:00
Qiang Yu
cf678836a9 red-qxl: use RedGLScanout for multi plane support
Create a new scanout struct supporting multi plane.
We'll use this struct to create different protocol
message for clients with different capability.

Signed-off-by: Qiang Yu <yuq825@gmail.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2025-04-25 08:26:29 +01:00
Marc-André Lureau
f0eb8cc57d Warn on invalid surface_id at qxl_spice_destroy_surface_wait()
Fixes:
https://gitlab.freedesktop.org/spice/spice/-/issues/83

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2024-06-12 12:40:33 +01:00
osy
7c5f3d5e40 red-qxl: remove cookie assertion on scanout
The original check ensures we do not have an outstanding GL_DRAW. However,
in QEMU, there is no guarantee that a scanout cannot happen while the async
GL_DRAW has not returned a result yet. This introduces a race where if a
scanout is called while there is an outstanding GL_DRAW, QEMU will crash.

Signed-off-by: osy <osy@turing.llc>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2024-05-26 16:34:02 +01:00
Rosen Penev
e2848118bf clang-tidy: use C++ casting
Found with google-readability-casting

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-28 09:36:49 +01:00
Rosen Penev
5513bce73e clang-tidy: replace C headers with C++
Found with modernize-deprecated-headers

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2021-08-26 07:35:09 +01:00
Frediano Ziglio
1b02f2d3d0 red-worker: Associate message structure and numbers
Makes sure a message is sent with the proper message number.
Reduce mistakes associating types with wrong registered number.
Make easier to add new messages in the future.
Avoids having to type the message number every time, it's inferred
from the type.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-06-01 22:08:55 +01:00
Rosen Penev
aefcd7d1c4 clang-tidy: use uppercase numeric literals
Found with readability-uppercase-literal-suffix

Avoids readability problems between lower case l and uppercase I.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2021-05-09 07:00:21 +01:00
Rosen Penev
8af176b15e clang-tidy: use nullptr
Found with modernize-use-nullptr

NULL in C++ is 0 whereas it is a void pointer in C. Avoids implicit
conversions.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2021-04-12 06:50:05 +01:00
Frediano Ziglio
f6f998004b Wrap spice.h in order to do some adjustment
Instead of including spice.h directly include an header that wraps
it. This allows to remove the SPICE_SERVER_INTERNAL define.
Currently is used to rename SpiceCharDeviceInstance to RedCharDevice
and reduce its visibility to hidden. This remove some warnings
and some weird code in the source.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-05-01 06:58:09 +01:00
Frediano Ziglio
2b9e1dcd55 dispatcher: Reuse base reference counting for Dispatcher hierararchy
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-05-01 06:58:09 +01:00
Frediano Ziglio
f4aefa728e Remove GObject from Dispatcher hierarchy
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-05-01 06:58:09 +01:00
Frediano Ziglio
164a333f99 Define and use (un)ref
Avoids g_object_(un)ref.
This in preparation to remove GObject.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-05-01 06:58:09 +01:00
Frediano Ziglio
e6e6ded681 Use C++ IS-A relationship for RedChannelClient and RedChannel
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2020-05-01 06:58:08 +01:00