Commit Graph

1341 Commits

Author SHA1 Message Date
Marc-André Lureau
791d5a2d46 s/process_drawable/process_draw
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-04 09:46:38 +00:00
Marc-André Lureau
b323afa6e8 server: move renderer members to DisplayChannel
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-03 17:18:33 +00:00
Frediano Ziglio
996ce40d7f worker: remove only assigned set_client_capabilities_pending field
This field is only assigned and never readed so can be removed.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-03 16:36:51 +00:00
Marc-André Lureau
23e17c2fc9 server: move bitmap related to spice-bitmap-utils
Also remove some unused function parameters from
bitmap_get_graduality_level()

Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-03 16:32:26 +00:00
Marc-André Lureau
1a787f0e99 worker: remove unused worker parameter
Acked-by: Pavel Grunt <pgrunt@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-03 14:02:35 +00:00
Marc-André Lureau
d9a0629bc1 Store QXLInstance in CursorItem
Doing so allows us to remove the extra QXLInstance parameter from
cursor_item_unref() and makes the code a bit cleaner.

Also add cursor_item_ref().

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-03 09:53:46 +00:00
Marc-André Lureau
e601e920bd server: make more of cursor private
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-03 09:07:18 +00:00
Marc-André Lureau
c9e3b058e4 server: make cursor channel private
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-03 09:06:55 +00:00
Marc-André Lureau
fb84cc956f Move pipe item enumerations out of red_worker.h
Move the cursor-specific pipe item types to cursor-channel.h, and the
display-specific types to red_worker.c. Only leave the common
definitions in red_worker.h. This prepares for splitting the display
channel into a separate file.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-02 16:02:23 +00:00
Marc-André Lureau
7198a06433 server: move display_channel_client_create() to dcc_new()
Move function from server/red_worker.c to new server/display-channel.c.

Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-02 14:00:54 +00:00
Marc-André Lureau
372eb0072a tree: move that to a separate unit
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-02 12:12:14 +00:00
Marc-André Lureau
9e42647101 worker: s/repoll/poll_tries
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-02 09:46:41 +00:00
Marc-André Lureau
0eedafaf0c Various minor style changes to worker and cursor channel
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 17:55:59 +00:00
Marc-André Lureau
5c7e248445 worker: remove assertion on alloc_drawable
There is no guarantee in the code that this can't be hit, so we should
cope with it (the condition can be reached easily by running the server
without waiting for blocked clients or pipe size)

The following commit will attempt to address this.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2015-10-30 17:18:31 +00:00
Marc-André Lureau
2eb732bd4d __new_channel -> red_worker_new_channel()
Rename and lightly refactor the function that creates new common
channels for RedWorker (essentially Cursor and Display channels).

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 17:15:18 +00:00
Marc-André Lureau
2d934ed82e Make cursor_channel_disconnect a CursorChannel method
The first argument should be CursorChannel* rather than RedChannel*
since it's essentially a CursorChannel method.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 16:56:13 +00:00
Francois Gouget
f2c8609985 server: Hide the MJPEG encoder internals from red_worker.c
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-10-30 15:35:47 +01:00
Francois Gouget
3708bf9cf0 server: Move the MJPEG encoder functions to mjpeg_encoder.c
Note that this requires some adjustments to the encode_frame()
parameters to avoid red_worker-specific types.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-10-30 15:35:47 +01:00
Francois Gouget
fd451860df server: Move mjpeg_encoder_new() to the end of mjpeg_encoder.c
This also allows getting rid of a couple of forward definitions.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-10-30 15:35:47 +01:00
Francois Gouget
c93d9fc1a2 server: Remove an unnecessary cast in encode_frame()
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
2015-10-30 11:17:29 +00:00
Marc-André Lureau
7b39f818b8 Remove a couple single-use static functions
red_cursor_marshall_inval(), red_migrate_cursor() and
on_new_cursor_channel() were short functions that were each only called
from a single location, so there's no need for them to be separate
functions.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:48:00 +00:00
Marc-André Lureau
30c9ff7a8f CursorChannel* arg in cursor_channel_client_new()
Instead of passing a CommonChannel* argument, use CursorChannel* since
this function is only valid for CursorChannels.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:47:56 +00:00
Marc-André Lureau
591f39e7cc common_channel_client_create -> common_channel_new_client
Rename and re-order the initial arguments to make this function look and
act more like a method of the CommonChannel class.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:47:53 +00:00
Marc-André Lureau
8f5a5582c0 Change red_marshall_verb() to accept a VerbItem
Instead of passing a verb enumeration value, pass the verb pipe item

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:47:50 +00:00
Marc-André Lureau
26005ddb04 Remove unused parameter from cursor_channel_new()
cursor_channel_new() is only called from one location, and always passes
FALSE as the value for the 'migrate' paramater. In addition, this
parameter is not used within the function. Remove it.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-30 08:47:45 +00:00
Frediano Ziglio
46d9c51f73 server: remove undefined declaration
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-29 20:06:07 +00:00
Marc-André Lureau
39b7e55ec7 Replace now() with get_mononotonic_time()
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-29 18:22:19 +00:00
Marc-André Lureau
93414b23fa utils: add red_get_monotonic_time() 2015-10-29 17:59:02 +00:00
Frediano Ziglio
1b2c3e4067 worker: avoid to use constant directly for capabilities size
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-29 17:46:27 +00:00
Marc-André Lureau
3c1ab4a5fa Move red_bitmap_utils.h->tmpl.c
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-29 11:27:09 +00:00
Marc-André Lureau
070e0fcd63 worker: move some cursor code to cursor-channel.c
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-29 09:58:25 +00:00
Marc-André Lureau
266d344b7f worker: rename some cursor functions
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-29 09:44:29 +00:00
Marc-André Lureau
5872d0a09c worker: change CursorItem memory allocation
Do not use static allocate space but handle dynamically

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-29 09:35:28 +00:00
Marc-André Lureau
788c9d4790 worker: remove unused type field from AddBufInfo
value was always BUF_TYPE_RAW

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <ulublin@redhat.com>
2015-10-28 15:31:48 +00:00
Frediano Ziglio
0b386603cb worker: fix timer queue creation
Timer queue is attached to current thread when created so it must be
created from the proper thread.
After worker initialization is moved in a following patch to main
thread the queue was created in the wrong thread causing program to
fail saying that the queue is NULL.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Uri Lublin <ulublin@redhat.com>
2015-10-28 15:28:29 +00:00
Marc-André Lureau
f55032ecba server: group worker channel related stuff
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-26 09:17:07 +00:00
Marc-André Lureau
f7b48981e3 worker: remove need for WorkerInitData
Move code around to declare and place it where it fits better.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-26 09:12:55 +00:00
Marc-André Lureau
579d65454c worker: access dispatcher pending field using helper functions
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-26 08:47:02 +00:00
Marc-André Lureau
e87b09a510 server: split cache-item.h
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 16:32:57 +01:00
Marc-André Lureau
f99fac0f42 server: start separate display/cursor channel headers
Just move some declarations around

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 16:32:47 +01:00
Marc-André Lureau
b9defad7d9 server: remove worker->id
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 14:46:22 +01:00
Christophe Fergeau
d88b1fee74 build-sys: Adjust to new spice-common spice-deps.m4
This commit also updates the spice-common submodule

Christophe Fergeau (7):
      Add marshaller test case
      build-sys: Use ${PKG_CONFIG} rather than pkg-config
      build-sys: Rework SPICE_CHECK_* m4 macros
      build-sys: Add gio-2.0 to SPICE_CHECK_GLIB2
      build-sys: Fix error in SPICE_CHECK_LZ4 description
      build-sys: Set automake conditional in SPICE_CHECK_SMARTCARD
      build-sys: Rename SUPPORT_GL to HAVE_GL

Javier Celaya (1):
      Fix linearization of several marshallers with one item

Lukas Venhoda (3):
      ssl-verify: Only check addr length when using IP addr
      m4: Require glib version >= 2.22
      ssl-verify: Changed IPv4 hostname to IPv6
2015-10-23 14:35:14 +02:00
Frediano Ziglio
90a08ebae8 remove small leak in MJPEG code
cinfo.dest is allocated in spice_jpeg_mem_dest but never freed.
Note that jpeg_destroy_compress does not free this field as is
supposed to be a buffer provided by jpeg caller.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 12:10:23 +01:00
Frediano Ziglio
a2ebe610c1 reduce locking time in async_command_alloc
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 12:08:38 +01:00
Frediano Ziglio
78c8203f16 removed unused recv_core field
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 12:08:09 +01:00
Marc-André Lureau
d3153f8610 worker: remove useless MESSAGE_READY
Now that worker is created before running, and run() returns success,
there is no point in using MESSAGE_READY.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 11:11:18 +01:00
Marc-André Lureau
ef89187eff dispatcher: style update
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-10-23 11:02:22 +01:00
Marc-André Lureau
bba1bf180a server: remove worker thread creation from dispatcher
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-10-22 17:06:44 +01:00
Marc-André Lureau
15da68dbde server/dispatcher: move worker enums to dispatcher header
Group enums with their respective struct location.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fabiano@fidencio.org>
2015-10-22 10:05:22 +01:00
Marc-André Lureau
31292412c9 worker: use a single clockid
The stat functions in worker are not generic enough to deserve to be
"non-worker", so just pass the worker instance.
2015-10-21 14:12:30 +01:00