summaryrefslogtreecommitdiffstats
path: root/server/red_worker.c
Commit message (Collapse)AuthorAgeFilesLines
* worker: group add_memslotMarc-André Lureau2015-11-091-18/+18
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: remove unused NUM_CURSORS defineMarc-André Lureau2015-11-091-1/+0
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: make more functions staticMarc-André Lureau2015-11-091-32/+32
| | | | Acked-by: Pavel Grunt <pgrunt@redhat.com>
* worker: remove unused functionMarc-André Lureau2015-11-091-7/+0
| | | | Acked-by: Pavel Grunt <pgrunt@redhat.com>
* worker: rename {put,ref}_red_drawableMarc-André Lureau2015-11-091-9/+9
| | | | Acked-by: Pavel Grunt <pgrunt@redhat.com>
* worker: s/destroy_surface/surface_unrefMarc-André Lureau2015-11-091-26/+28
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: remove unused parameter from remove_shadowFrediano Ziglio2015-11-091-2/+2
| | | | Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* worker: remove some useless countersMarc-André Lureau2015-11-091-13/+0
| | | | Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* server: create display and cursor channels in RedWorker constructorMarc-André Lureau2015-11-091-46/+22
| | | | | | | | Instead of requiring the dispatcher to send a message to the worker to create the display channel and cursor channel, just create them when the worker is created. Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* worker: use RED_CHANNEL_CLIENT for dccMarc-André Lureau2015-11-061-52/+53
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: move shadow_new() and container_new()Marc-André Lureau2015-11-061-42/+8
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: use more DCC_TO_WORKERMarc-André Lureau2015-11-061-21/+21
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: move some compress stats to displayMarc-André Lureau2015-11-061-104/+4
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: rename WORKER_FOREACH_DCC_SAFE macro to FOREACH_DCCMarc-André Lureau2015-11-061-20/+18
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: remove unused WORKER_TO_DCC macroMarc-André Lureau2015-11-061-6/+0
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: rename red_pipe_add_drawable* to dcc_add_drawable*Marc-André Lureau2015-11-061-7/+7
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: move delta computationMarc-André Lureau2015-11-061-8/+9
| | | | | | Move delta computation from red_add_drawable to red_current_add_with_shadow. Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: move MonitorsConfig to display channelMarc-André Lureau2015-11-051-41/+0
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: minor simplificationMarc-André Lureau2015-11-051-19/+23
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: don't process drawable if it can't be allocatedFrediano Ziglio2015-11-051-4/+6
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* worker: move DisplayChannel structMarc-André Lureau2015-11-051-32/+0
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* style: prefer early return to large if blocksJonathon Jongsma2015-11-041-22/+24
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: Move some dpi code to display channelMarc-André Lureau2015-11-041-84/+50
| | | | | | | | This commit moves some DrawablePipeItem declarations to display-channel.h, though the function implementations remain in red_worker.c until they can be disentangled some more. Acked-by: Frediano Ziglio <fziglio@redhat.com>
* Palette cache: Use correct marshal functionJonathon Jongsma2015-11-041-6/+8
| | | | | | | | | | | In order to invalidate a single palette cache item, we were using spice_marshall_msg_cursor_inval_one(), which is the marshal function used to send an invalidation message for the Cursor channel's cache. This didn't cause any problems because SPICE_MSG_CURSOR_INVAL_ONE and SPICE_MSG_DISPLAY_INVAL_PALETTE have the same message ID and parameters, but it's better to use the correct marshalling function. Acked-by: Frediano Ziglio <fziglio@redhat.com>
* Various changes in RedWorker and CursorChannel related to error and warning ↵Marc-André Lureau2015-11-041-10/+7
| | | | | | | messages. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* Move monitors_config to displayMarc-André Lureau2015-11-041-96/+34
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* s/process_drawable/process_drawMarc-André Lureau2015-11-041-4/+4
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* server: move renderer members to DisplayChannelMarc-André Lureau2015-11-031-16/+15
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: remove only assigned set_client_capabilities_pending fieldFrediano Ziglio2015-11-031-3/+0
| | | | | | | 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>
* server: move bitmap related to spice-bitmap-utilsMarc-André Lureau2015-11-031-146/+12
| | | | | | | Also remove some unused function parameters from bitmap_get_graduality_level() Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
* worker: remove unused worker parameterMarc-André Lureau2015-11-031-7/+7
| | | | | Acked-by: Pavel Grunt <pgrunt@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* server: make more of cursor privateMarc-André Lureau2015-11-031-16/+7
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* server: make cursor channel privateMarc-André Lureau2015-11-031-54/+45
| | | | Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
* Move pipe item enumerations out of red_worker.hMarc-André Lureau2015-11-021-0/+17
| | | | | | | | | | 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>
* server: move display_channel_client_create() to dcc_new()Marc-André Lureau2015-11-021-62/+3
| | | | | | | 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>
* tree: move that to a separate unitMarc-André Lureau2015-11-021-255/+10
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: s/repoll/poll_triesMarc-André Lureau2015-11-021-12/+12
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>
* Various minor style changes to worker and cursor channelMarc-André Lureau2015-10-301-2/+5
| | | | | Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
* worker: remove assertion on alloc_drawableMarc-André Lureau2015-10-301-1/+3
| | | | | | | | | | | 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>
* __new_channel -> red_worker_new_channel()Marc-André Lureau2015-10-301-33/+26
| | | | | | | | 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>
* Make cursor_channel_disconnect a CursorChannel methodMarc-André Lureau2015-10-301-1/+1
| | | | | | | | 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>
* server: Hide the MJPEG encoder internals from red_worker.cFrancois Gouget2015-10-301-14/+8
| | | | Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
* server: Move the MJPEG encoder functions to mjpeg_encoder.cFrancois Gouget2015-10-301-67/+6
| | | | | | | 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>
* server: Remove an unnecessary cast in encode_frame()Francois Gouget2015-10-301-2/+1
| | | | Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
* Remove a couple single-use static functionsMarc-André Lureau2015-10-301-26/+14
| | | | | | | | | | 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>
* CursorChannel* arg in cursor_channel_client_new()Marc-André Lureau2015-10-301-1/+1
| | | | | | | | 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>
* common_channel_client_create -> common_channel_new_clientMarc-André Lureau2015-10-301-12/+12
| | | | | | | | 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>
* Change red_marshall_verb() to accept a VerbItemMarc-André Lureau2015-10-301-2/+2
| | | | | | | 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>
* Remove unused parameter from cursor_channel_new()Marc-André Lureau2015-10-301-1/+1
| | | | | | | | | 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>
* Replace now() with get_mononotonic_time()Marc-André Lureau2015-10-291-13/+11
| | | | Acked-by: Frediano Ziglio <fziglio@redhat.com>