Commit Graph

3696 Commits

Author SHA1 Message Date
Vivek Kasireddy
8c19f83a51 dcc-send: Encode and send gl_draw stream data to the remote client (v4)
For remote (or non-gl) clients, if a valid gl_draw stream exists,
then we first extract the dmabuf fd associated with the scanout and
share it with the encoder along with other key parameters such as
stride, width and height. Once the encoder finishes creating an
encoded buffer (using the dmabuf fd as input), we then send it
over to the client. And, as soon as the encoder notifies that it
is no longer using the dmabuf fd, we send a gl_draw_done async to
the application.

v2: (suggestions and fixups from Frediano)
- Moved the DisplayStreamData initialization code from
  red_marshall_stream_data() into a separate function that is reused
  when marshalling gl_draw_stream.
- Used new/delete instead of g_new/g_free for creating and destroying
  dmabuf_data object
- s/notify_mem_free/free
  s/red_gst_mem_free_cb/red_free_fb
- Removed the usage of opaque from red_free_cb

v3:
- Obtain the key params such as fd, stride, etc from the stream instead
  of the scanout
- Replace the switch with if in red_marshall_gl_draw_stream() to avoid
  printing a warning (and spamming the console) when a frame is dropped

v4:
- Slightly improve the readability of red_marshall_gl_draw_stream() by
  adding checks at the start

Cc: Frediano Ziglio <freddy77@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
2024-11-22 15:32:35 +01:00
Vivek Kasireddy
a9ecd27096 dcc: Create a stream associated with gl_draw for non-gl clients (v6)
For non-gl/remote clients, if there is no stream associated with
the DisplayChannel, then we create a new stream. Otherwise, we
just update the current stream's timestamp.

v2: (suggestions and fixups from Frediano)
- Moved the gl_draw_stream object from DCC to DC
- Moved the stream initialization code from display_channel_create_stream()
  into a separate function that is reused when creating gl_draw_stream

v3:
- Create a new primary surface whenever a new stream gets created

v4:
- Use nullptr instead of NULL and true instead of TRUE (Frediano)
- Create the stream as part of gl scanout instead of gl draw operation
  so that if would be easily possible to obtain key params such as
  stride, flags, etc
- Store key params such as fd, flags, stride, etc in the stream so that
  we do not have to look at scanout again

v5: (Frediano)
- No need to pass scanout object to create_gl_draw_stream as it is
  always NULL
- Don't compute the stream's last_time if drawable is valid
- Let the default input_fps be MAX_FPS
- Use uint32_t type for stride
- Make sure that a newly created stream is provided to all connected clients
- When the scanout's drm_dma_buf_fd is associated with a stream, take
  an additional reference on the fd to ensure that it is not closed
  when the stream might still be using it

v6:
- Add a new helper is_new_stream_needed() to determine when to create new
  stream
- Add more checks to see if the encoder is created or not
- Don't share the dmabuf fd with the stream and instead keep the
  ownerhip of the fd with the scanout

Cc: Frediano Ziglio <freddy77@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
2024-11-22 15:32:35 +01:00
Vivek Kasireddy
06ee73ae24 dcc: Check to see if the client supports multiple codecs (v2)
We need to determine if the client is new enough to support multiple
codecs -- which might include any of the Gstreamer based ones.

v2: (suggestions and fixups from Frediano)
- Add is_gl_client() method to DisplayChannelClient instead of a
  dcc_is_gl_client() function.
- Avoid the usage of XXX_CAST macro.

Cc: Frediano Ziglio <freddy77@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2024-11-22 15:32:35 +01:00
Vivek Kasireddy
e2904b9e89 gstreamer-encoder: Use a h/w based encoder with Intel GPUs if possible (v5)
Once it is determined that an Intel GPU is available/active (after
looking into udev's database), we try to see if there is a h/w
based encoder (element) available (in Gstreamer's registry cache)
for the user selected video codec. In other words, if we find that
the Intel Media SDK Gstreamer plugin (libgstmsdk.so) and associated
libraries (such as va or vaapi) are all installed properly, we add
the appropriate h/w based encoder and post-processor/converter
elements to the pipeline (along with any relevant options) instead
of the s/w based elements.

For example, if the user selects h264 as the preferred codec format,
msdkh264enc and vapostproc will be preferred instead of x264enc
and videoconvert.

v2: (addressed some review comments from Frediano)
- Moved the udev helper into spice-common
- Refactored the code to choose plugins in order msdk > va > vaapi

v3: (Frediano)
- Added relevant encoder options for mjpeg and vp9 codecs (Jin Chung)

v4: (Fixups from Frediano)
- Free the encoder when we cannot find vpp
- Change type and find plugins array length using G_N_ELEMENTS
- Fix gstenc_name UAF by freeing it at the end of the function
- Use g_str_has_prefix instead of strstr
- Include the string "_hw_" in function names that deal with
  h/w based plugins
- Rebase on master

v5: rebase on master

Cc: Frediano Ziglio <freddy77@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Co-developed-by: Jin Chung Teng <jin.chung.teng@intel.com>
Co-developed-by: Hazwan Arif Mazlan <hazwan.arif.mazlan@intel.com>
2024-11-22 15:32:35 +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
Frediano Ziglio
7e56fc9fd9 Send real time to client
Do not offset the time attempting to fix client latency.
Client should handle it by itself.

This remove entirely the delay introduced by the server.
This avoids surely possible time drifts in the client.
The server just sends it's concept of time without trying to force any
delay. Only one end should handle this delay in an attempt to
synchronize audio and video instead that doing it in both ends.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2024-06-04 20:32:25 +01:00
Frediano Ziglio
b92149f2b9 tests: Remove warning compiling
Remove:

    test-display-streaming.c: In function 'get_commands':
    test-display-streaming.c:218:42: error: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
      218 |     *commands = (Command*) calloc(sizeof(Command), *num_commands);
          |                                          ^~~~~~~
    test-display-streaming.c:218:42: note: earlier argument should specify number of elements, later size of each element

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2024-05-27 19:03:45 +01:00
osy
4674667f0c red-stream: disable socket_set_cork() on Darwin
TCP_NOPUSH is broken and cannot be used.

Signed-off-by: osy <osy@turing.llc>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2024-05-26 16:41:37 +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
Frediano Ziglio
fe1c25f530 test-listen: Use OpenSSL BIO instead of GIO library
test-listen using GIO had issues running under CI for a while.
GIO is reading some desktop configuration so it's not very CI
friendly.
So instead of using GIO use OpenSSL BIO. The code does not
get much bigger or complicated.
We are already using OpenSSL so we are not adding dependencies.

This fixes CI for Fedora 39 (just released and available on docker).

This allowed to remove an old workaround for GIO in .gitlab-ci.yml
(cfr commit 89edf80821
"ci: Workaround an issue with GLib on Fedora 30")

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-11-22 07:36:40 +00:00
Frediano Ziglio
7cfebdf61b red-stream: Fix typo in comment
renogotiation -> renegotiation

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-11-15 18:40:35 +00:00
Vivek Kasireddy
3208be4521 gstreamer-encoder: Use an env var to override converter format
If we use the x264enc encoder to encode a stream, then videoconvert
would convert the BGRx data into Y444, which is the preferred format
for x264enc. However, some decoders particularly the ones that are
h/w based cannot work with Y444 if it was the format used by the
encoder. Therefore, to address these situations, we need a way to
override the format used during the encoding stage which can be
accomplished by using the environment variable introduced in this
patch: SPICE_CONVERTER_PREFERRED_FORMAT.

For example, using NV12 as the output format for the videoconvert
element would allow us to pair a s/w based encoder (such as x264enc)
with a h/w based decoder (such as msdkh264dec) for decoding the
stream as most h/w based decoders only work with NV12 format given
its popularity.

Note that choosing an encoder format such as NV12 over Y444 would
probably result in decreased video quality although it would be
compatible with more decoders. Ideally, the client and server need
to negotiate a suitable format dynamically but the current
capabilities do not allow for such exchange.

Cc: Frediano Ziglio <freddy77@gmail.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>
Based-on-patch-by: Hazwan Arif Mazlan <hazwan.arif.mazlan@intel.com>
Signed-off-by: Jin Chung Teng <jin.chung.teng@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2023-11-15 18:04:56 +00:00
Frediano Ziglio
fe4723d176 build: Remove support for GStreamer 0.10
Deprecated since 2016.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-09-17 10:00:41 +01:00
Frediano Ziglio
f60d61186f ci: Update makecheck-windows job to Meson
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-05-30 20:35:57 +01:00
Biswapriyo Nath
3dfd5243c7 smartcard: Fix compiling for Windows platform
This fixes the following compiler error while targeting Windows platform.

../../server/smartcard.cpp:20:10: fatal error: arpa/inet.h: No such file or directory
   20 | #include <arpa/inet.h>
      |          ^~~~~~~~~~~~~

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2023-05-30 19:44:15 +01:00
orbea
5e580eefac server: add SSL_OP_NO_RENEGOTIATION fallback path
With LibreSSL SSL_OP_NO_CLIENT_RENEGOTIATION is opaque which is not
compatible with the OpenSSL 1.0.2 and earlier code path in
red-stream.cpp while SSL_OP_NO_RENEGOTIATION is not yet defined for the
newer OpenSSL code path in reds.cpp.

So with OpenSSL 1.1.0 and later if SSL_OP_NO_RENEGOTIATION is undefined
and SSL_OP_NO_CLIENT_RENEGOTIATION is defined then define the former as
the latter. This will allow the build to succeed with LibreSSL 3.7.2 and
in the future when newer LibreSSL versions add SSL_OP_NO_RENEGOTIATION
that code path will then be used automatically.

Signed-off-by: orbea <orbea@riseup.net>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2023-05-26 22:41:44 +01:00
Frediano Ziglio
e625a10a7a Update OpenSSL call
SSLv23_method call was deprecated in favour of TLS_method.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-05-10 11:17:47 +01:00
Frediano Ziglio
9213308fd3 ci: Fix compile error using new GStreamer library
Using Fedora 38 the compilation fails due to this warning:

    In file included from /usr/include/gstreamer-1.0/gst/video/video.h:202,
                     from ../../server/gstreamer-encoder.c:27:
    /usr/include/gstreamer-1.0/gst/video/video-sei.h:39:21: error: 'H265_MISP_NANOSECONDS' defined but not used [-Werror=unused-const-variable=]
       39 | static const guint8 H265_MISP_NANOSECONDS[] = {
          |                     ^~~~~~~~~~~~~~~~~~~~~

Ignore the warning for Gstreamer includes.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-05-10 11:14:35 +01:00
Frediano Ziglio
6089c90a62 ci: Fix check-valgrind job
Avoid downgrading gstreamer1-plugins-good, no longer necessary.
Add suppression for pthread_create leak.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2023-05-10 10:56:42 +01:00
Volker Rümelin
a5d1d957d6 sound: Fix pointer arithmetic in snd_record_handle_write()
The variable 'now' counts in audio sample frames, but the variable
'data' is of type uint8_t *. Multiply 'now' by the size of an audio
sample frame to get the correct source pointer.

This improves the quality of audio recordings in QEMU a little bit.

Fixes: 5d5a7bd181 ("sound: Avoid cast that could cause alignment problems")

Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2022-10-22 20:58:02 +01:00
Frediano Ziglio
a225ebe921 test-leaks: Load DH parameters to test this part of code
Just loding the file is enough to test code in reds.cpp.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2022-08-03 19:03:08 +01:00
Frediano Ziglio
2cd6766b0d Adapt to new OpenSSL with less conditional code
Reduce conditional code using new OpenSSL interface and implement
missing APIs.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2022-08-03 19:03:08 +01:00
Marc-André Lureau
dc40a18092 Fix OpenSSL 3.0 API deprecations
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-08-03 19:03:08 +01:00
Marc-André Lureau
36f501ef75 Generate a random connection ID with g_random_int()
Spice uses rand() to generate the random id, but qemu (at least in the case
of qemu-system-x86) fails to initialize the RNG seed (with e.g. srand()).

The result is, that every SPICE session started (by e.g. libvirtd) has the
same client_id. Usually, this is not a problem, but running something like
a SPICE proxy, relying on the client_id to correctly route connections,
this creates problems.

Fixes:
https://gitlab.com/qemu-project/qemu/-/issues/163

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-07-19 14:41:39 +04:00
Frediano Ziglio
acfa6f6bf8 Fix C++ compatibility issue
Remove deprecation warnings like

In file included from ../../server/char-device.cpp:28:
../../server/safe-list.hpp:108:43: error: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Werror=deprecated-declarations]
  108 | class safe_list<T>::iterator: public std::iterator<std::forward_iterator_tag, T>
      |                                           ^~~~~~~~

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2022-07-19 10:11:55 +01:00
Marc-André Lureau
e8cb170509 Fix std::array<> has initializer but incomplete type
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2022-07-19 10:04:51 +01:00
Frediano Ziglio
dd4c11ae98 ci: Exclude a system leak in Fedora 35
This leak causes a CI failure running test-listen test with
Valgrind.
Note that "check-valgrind" CI job will still fail but with
less issues.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2022-03-23 15:03:23 +00:00
Antonio Larrosa
46e3a57ccd Fix build with gstreamer 1.20.x
gstreamer-plugins-base 1.20 includes a new member in the
GstAppSinkCallbacks struct:

 gboolean      (*new_event)        (GstAppSink *appsink, gpointer user_data);

So it has to be initialized in order to build test-gst.cpp
successfully.

(added in
0a657d6db5
)

Acked-by: Frediano Ziglio <freddy77@gmail.com>
2022-03-23 13:39:52 +00:00
Christian Ehrhardt
ab9ad87c5f
Revert "reds: start QXL devices if VM is running" (fix race)
Due to reds->vm_running being initialized to TRUE (since c302e12c
"spice.h: add entries for tracking vm state") the assumption in c23cbd6f
"reds: start QXL devices if VM is running" was wrong and we can't check
on vm_running until that initialization isn't on TRUE (it is that way for
backward compatibility).

Without this revert on qemu initializing spice we will have the
display_init side of qemu not yet ready and therefore respond badly when
spice sends an event as reaction to `red_qxl_start`:
   "qxl_send_events: spice-server bug: guest stopped, ignoring."

At least with qemu > v2.0 as a spice consumer is not showing issues as
`red_qxl_start` will be called just after the qemu side is ready
`qemu_spice_display_start` -> `spice_server_vm_start`  ... `red_qxl_start`.

Therefore - for now to avoid the current regression - Revert c23cbd6f
"reds: start QXL devices if VM is running" until that old (2012)
initialization is updated (probably an ABI change and therefore taking
some time).

Fixes: https://gitlab.freedesktop.org/spice/spice/-/issues/64

This reverts commit c23cbd6fa8.
2022-03-21 11:37:11 +01:00
Frediano Ziglio
b24e2ea68e ci: Fix compile error using new GStreamer library
Using Fedora 35 the compilation fails due to this warning:

    ../server/gstreamer-encoder.c: In function 'create_pipeline':
    ../server/gstreamer-encoder.c:994:5: error: braces around scalar initializer [-Werror]
     994 |     GstAppSinkCallbacks appsink_cbs = {NULL, NULL, &new_sample, {NULL}};
         |     ^~~~~~~~~~~~~~~~~~~
    ../server/gstreamer-encoder.c:994:5: note: (near initialization for 'appsink_cbs.new_event')
    ../server/gstreamer-encoder.c:994:5: error: missing initializer for field '_gst_reserved' of 'GstAppSinkCallbacks' [-Werror=missing-field-initializers]
    In file included from ../server/gstreamer-encoder.c:26:
    /usr/include/gstreamer-1.0/gst/app/gstappsink.h:81:16: note: '_gst_reserved' declared here
       81 |   gpointer     _gst_reserved[GST_PADDING - 1];
          |                ^~~~~~~~~~~~~
    cc1: all warnings being treated as errors

Change structure initialisation to avoid the warning.
The same syntax is already used in server/tests/test-gst.cpp.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2022-01-29 16:25:43 +00:00
Geoffrey McRae
cf061597b6 Report name/uuid and agent connected tokens support.
A well behaved client implementing the SPICE protocol should check to see
if the server supports the capabilities it needs. This implementation of
the spice-server supports `SPICE_MAIN_CAP_NAME_AND_UUID` and `
SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS` so it should report this to the
client.

Acked-by: Frediano Ziglio <freddy77@gmail.com>
2022-01-04 10:16:19 +00:00
Simon Chopin
3d32295f9e test-leaks: fix the test with OpenSSL3
In OpenSSL3, the SSL_accept call now emits proper errors, which we dump
*before* emitting the expected "SSL_accept failed" error message. The
g_test_expect_message framework doesn't really allow us to discard
messages AFAICT, so instead we add a new expectation with fairly loose
criteria.

Fixes #63

Signed-off-by: Simon Chopin <simon.chopin@canonical.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2021-11-11 09:23:51 +00: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
Frediano Ziglio
d17e7878cb Remove useless typedefs
Just use forward declaration if needed.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2021-08-26 20:59:41 +01:00
Frediano Ziglio
55897eba0f Remove some constant usage, use size from arrays
Makes more clear that we are scanning entire arrays or
checking for some container boundaries.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
2021-08-26 09:02:41 +01:00
Frediano Ziglio
e0dab7f4ef reds: Use proper maximum constant for time_t
Some systems use 32-bits, other 64-bits.
Some systems use signed integers, other unsigned integers.
Compute maximum constant based on time_t type.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2021-08-26 07:37:51 +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
Rosen Penev
24f67439e4 several conversions to std::array
These conversions allowed extra conversions to for range loops in
addition to replacing macro usage with .size().

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Frediano Ziglio <freddy77@gmail.com>
2021-08-23 10:41:11 +01:00
Frediano Ziglio
258fda6290 Remove now useless check
display_channel_surface_id_unref resets the surface so
display_channel_surface_has_canvas will return false.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-08-07 07:46:15 +01:00
Frediano Ziglio
d8bca15f2b Allows surfaces to be updated without having to wait
Store pointers to surface object in "surfaces" and allows to
have different surfaces with same ID in memory.
The surface was keep "busy" if there was pending drawing around.

Consider the following case:
 1- receive drawing command
 2- queue command on DCCs
 3- destroy surface
 4- send draw
Previously at point 4) you would have to use a surface from
"surfaces" which was destroyed, that is we would have to maintain
the pointer (and canvas) to the surface until reference counter
was 0.

However consider this case:
 1- receive drawing command
 2- queue command on DCCs
 3- destroy surface
 4- create surface
 5- send draw
What would happen in point 4) ?
We could not change the surface as it will be used by point 5).
To avoid this the code attempts to wait the commands to release the
surface. However this can be an issue, you can't force the clients
to receive pending data if network is slow.

So this patch change this allowing to create surfaces while the old
version will still be used.

This is also more clean from the reference pointer prospective,
as the reference is increased for a specific surface.

Note that now instead of checking for canvas to not be NULL a
simple check for surface pointer is enough.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-08-07 07:46:12 +01:00
Frediano Ziglio
f5c2043143 Remove last direct surface IDs usages
Mostly left on dcc-send.cpp.
Other minor too.

The change in BitmapData seems odd but the id for cached image
was not used so the only information left was the surface.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-08-07 07:46:09 +01:00
Frediano Ziglio
4434c6fb96 Change validate_surface to return surface pointer
Instead of computing the value inside the function to then
compute also in the caller return it.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-08-07 07:46:07 +01:00
Frediano Ziglio
1d123192e7 Use directly surface instead of id
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-08-07 07:46:05 +01:00
Frediano Ziglio
74c660ddad Pass surface directly to dcc_push_surface_image
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-08-07 07:46:04 +01:00
Frediano Ziglio
3b790b8ad6 Pass surface directly to dcc_create_surface
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-08-07 07:46:02 +01:00
Frediano Ziglio
78bc3a637a New function to pass surface directly to display_channel_draw
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-08-07 07:46:01 +01:00
Frediano Ziglio
5a5d1e21b5 Pass surface directly calling display_channel_current_flush
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-08-07 07:45:59 +01:00
Frediano Ziglio
58a612a039 Pass surface directly calling dcc_clear_surface_drawables_from_pipe
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-08-07 07:45:57 +01:00
Frediano Ziglio
2b219cace5 Pass surface directly calling draw_depend_on_me and display_channel_destroy_surface
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-08-07 07:45:55 +01:00
Frediano Ziglio
493077d080 Pass surface directly in is_primary_surface
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Victor Toso <victortoso@redhat.com>
2021-08-07 07:45:54 +01:00