Commit Graph

2150 Commits

Author SHA1 Message Date
Jonathon Jongsma
0e7617e51f worker: Move is_opaque_item() to tree.h
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-11 11:59:58 +00:00
Marc-André Lureau
a7fc621750 worker: move drawable to display
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-11 09:53:40 +00:00
Marc-André Lureau
7b3f277a72 worker: move current to display
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-10 17:38:48 +00:00
Marc-André Lureau
4a1668a755 worker: move red_destroy_surface_item()
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-10 17:38:48 +00:00
Marc-André Lureau
4987df8e67 worker: move stream to display channel
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-10 17:38:39 +00:00
Marc-André Lureau
5a216d2eb1 worker: move DisplayChannel/DisplayChannelClient functions together
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-11-10 17:18:45 +00:00
Marc-André Lureau
921ec344bc worker: rename functions that handle DisplayChannelClient
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>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-10 16:10:07 +00:00
Marc-André Lureau
885557f117 worker: move stream functions to a new stream.c file
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>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-10 16:09:28 +00:00
Marc-André Lureau
1e4abdc15d worker: move stream definitions to a new stream.h file
Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-10 16:06:08 +00:00
Marc-André Lureau
ab2e8a9cc0 worker: fix RED_STREAM_TIMOUT macro spelling
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-10 15:43:22 +00:00
Frediano Ziglio
1763e7ebf2 remove server/stream.h file added by mistake in previous commit
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-10 15:42:08 +00:00
Marc-André Lureau
face40e19e worker: move image cache to display
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-10 10:02:08 +00:00
Marc-André Lureau
1b9d767ca7 worker s/surfaces_dest/surface_deps
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-10 09:35:42 +00:00
Pavel Grunt
0426524546 syntax-check: Add missing #include <config.h> 2015-11-09 19:41:28 +01:00
Pavel Grunt
1eb94c0fb0 red_dispatcher: Remove unused signal.h include 2015-11-09 19:41:22 +01:00
Marc-André Lureau
9c57505849 worker: group add_memslot
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-09 17:03:34 +00:00
Marc-André Lureau
873639abf7 worker: remove unused NUM_CURSORS define
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-09 16:59:28 +00:00
Marc-André Lureau
66ed1f63b8 worker: make more functions static
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-09 14:51:19 +00:00
Marc-André Lureau
df716c5c53 worker: remove unused function
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-09 14:50:45 +00:00
Marc-André Lureau
7eee2de67c worker: rename {put,ref}_red_drawable
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-09 14:34:45 +00:00
Marc-André Lureau
88ce49b661 worker: s/destroy_surface/surface_unref
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-09 11:34:43 +00:00
Frediano Ziglio
4ef2618f52 worker: remove unused parameter from remove_shadow
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-09 10:46:50 +00:00
Marc-André Lureau
e2a3d57735 worker: remove some useless counters
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-09 10:46:36 +00:00
Marc-André Lureau
cd15fcb627 dispatcher: remove receive_data and send_data functions
Use read_safe/write_safe instead which do the same stuff

Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-11-09 10:25:32 +00:00
Marc-André Lureau
452edd8f7a server: create display and cursor channels in RedWorker constructor
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>
2015-11-09 10:24:21 +00:00
Marc-André Lureau
ff1b0b88b8 worker: use RED_CHANNEL_CLIENT for dcc
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-06 13:38:03 +00:00
Pavel Grunt
6ebb2ebe2a spicevmc: Return early when instance has no device state
Same approach as in spice_server_char_device_wakeup().
Avoid segmentation fault when the webdav channel (spice port channel) is
used with the vnc display:
 #0  0x00007ffff7aab734 in spice_char_device_state_opaque_get (dev=0x0)
     at char_device.c:720
 #1  0x00007ffff7b0850c in spice_server_port_event (sin=<optimized out>, event=<optimized out>) at spicevmc.c:578
 #2  0x0000555555787ba4 in set_guest_connected (port=<optimized out>, guest_connected=1) at hw/char/virtio-console.c:89
 #3  0x0000555555678d7c in control_out (len=<optimized out>, buf=0x55555775c3a0, vser=0x5555578d1540) at /home/pgrunt/RH/qemu/hw/char/virtio-serial-bus.c:404
 #4  0x0000555555678d7c in control_out (vdev=0x5555578d1540, vq=0x555557941bc8)
     at /home/pgrunt/RH/qemu/hw/char/virtio-serial-bus.c:441
 #5  0x000055555588eb98 in aio_dispatch (ctx=0x5555562e1a50) at aio-posix.c:160
 #6  0x00005555558829ee in aio_ctx_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>) at async.c:226
 #7  0x00007ffff2010e3a in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
 #8  0x000055555588d8fb in main_loop_wait () at main-loop.c:211
 #9  0x000055555588d8fb in main_loop_wait (timeout=<optimized out>)
     at main-loop.c:256
 #10 0x000055555588d8fb in main_loop_wait (nonblocking=<optimized out>)
     at main-loop.c:504
 #11 0x000055555561b664 in main () at vl.c:1891
2015-11-06 11:26:17 +01:00
Marc-André Lureau
e76f402952 worker: move shadow_new() and container_new()
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-06 10:10:40 +00:00
Marc-André Lureau
c9bb089869 worker: use more DCC_TO_WORKER
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-06 10:03:12 +00:00
Marc-André Lureau
ed70743f7c worker: move some compress stats to display
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-06 09:35:16 +00:00
Marc-André Lureau
e839dc23b3 worker: rename WORKER_FOREACH_DCC_SAFE macro to FOREACH_DCC
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-06 09:28:49 +00:00
Marc-André Lureau
de1ab756b0 worker: remove unused WORKER_TO_DCC macro
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-06 09:23:02 +00:00
Marc-André Lureau
13888ae6a2 worker: rename red_pipe_add_drawable* to dcc_add_drawable*
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-06 09:22:51 +00:00
Marc-André Lureau
f1c7bca4d4 worker: move delta computation
Move delta computation from red_add_drawable to red_current_add_with_shadow.

Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-06 09:16:02 +00:00
Marc-André Lureau
e603e96837 worker: move MonitorsConfig to display channel
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-05 12:40:55 +00:00
Marc-André Lureau
81cf3997db worker: minor simplification
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-05 11:13:25 +00:00
Frediano Ziglio
63b8ea5afb worker: don't process drawable if it can't be allocated
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-05 11:12:55 +00:00
Marc-André Lureau
d29ebe4590 worker: move DisplayChannel struct
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-05 11:12:29 +00:00
Jonathon Jongsma
ac53e6a3c3 style: prefer early return to large if blocks
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-04 18:25:50 +00:00
Jonathon Jongsma
b26c4a7898 Remove unnecessary typedef from pixmap-cache.h
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-04 13:04:17 +00:00
Marc-André Lureau
5f1bdb2166 worker: Move some dpi code to display channel
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>
2015-11-04 13:03:53 +00:00
Fabiano Fidêncio
3cc2513d33 cursor: fix wrong logic when initializing the channel
It's a regression introduced by commit e601e920bd. The logic error was
introduced when trying to achieve the following code[0]. but rewritten
to prefer an early return, which was wrogly negated.

[0]:
if (cursor_is_connected(worker)
    && !COMMON_CHANNEL(worker->cursor_channel)->during_target_migrate) {
        red_channel_pipes_add_type(RED_CHANNEL(worker->cursor_channel),
                                   PIPE_ITEM_TYPE_CURSOR_INIT);
}

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-04 11:20:48 +00:00
Jonathon Jongsma
cf3ca136e6 Palette cache: Use correct marshal function
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>
2015-11-04 11:09:35 +00:00
Marc-André Lureau
d8f89125fb Various changes in RedWorker and CursorChannel related to error and warning messages.
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-04 10:27:09 +00:00
Marc-André Lureau
fae3f7a062 Move monitors_config to display
Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
2015-11-04 10:00:08 +00:00
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