Commit Graph

15 Commits

Author SHA1 Message Date
Christophe Fergeau
e45ab9cf23 Use QXLInstance instead of QXLState in red_qxl_*
This seems to make more sense this way, QXLInstance is the 'main' object
with QXLState being its private data. External users then use QXLInstance
rather than passing a pointer to the private data to red-qxl.h methods.

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-03-17 16:26:33 +00:00
Christophe Fergeau
3ae8ce38a1 Use more explicit variable name in marshall_gl_scanout()
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-03-15 21:36:10 +00:00
Frediano Ziglio
e9ed125dbd use QXLState instead of RedDispatcher
Considering that:
- QXLState is the state of QXLInstance implementation;
- RedDispatcher is the implementation of QXL;
- qif (QXLInterface*) field can be computed really easy from QXLInstance;
- most of its state is private.
Make all structure private and use QXLState instead of RedDispatcher.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2016-03-04 15:47:45 +00:00
Frediano Ziglio
0ebd3b0d04 dcc: move id from CommonChannelClient to DisplayChannelClient
Was not used by CursorChannelClient but only by DisplayChannelClient.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2016-02-16 13:07:08 +00:00
Christophe Fergeau
78b495e467 qxl: Remove unused group_id arg to fill_attr
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-02-15 12:28:43 +00:00
Jonathon Jongsma
41d97b037a Add RedsState arg to all stat functions
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-02-15 12:04:02 +00:00
Frediano Ziglio
fbdea0fa79 CommonChannel: hold a reference to QXLInstance instead of RedWorker
CommonChannel does not need to know about RedWorker.
This reduce a bit dependencies between objects.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2016-02-11 23:51:46 +00:00
Marc-André Lureau
381dc93ec0 Handle GL_DRAW messages
Create an async, and marshall the GL_DRAW message. Count number of
clients, and wait until gl_draw_async_count is 0 to complete the async.
The count is going to be updated in the following patch when the client
is done with the draw.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
[removed unused sent field; move gl_draw_async_count to DisplayChannel
 - Frediano Ziglio]
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
2016-02-09 14:01:25 +00:00
Marc-André Lureau
7a06efde1c Handle GL_SCANOUT messages
Go through dispatcher and marshall scanout message. Since the marshaller
and the QXL state are manipulated from different threads, add a mutex to
protect the current scanout.

Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com>
2016-02-09 14:01:17 +00:00
Pavel Grunt
a310ac8860 dcc-send: Use dcc_compress_image to compress image
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2016-01-20 16:04:59 +00:00
Frediano Ziglio
9c56c884ad dcc: do not cause problem with multiple threads.
With multiple cards configured you can have multiple workers running in
different thread.
With such configuration static variables not syncronized could lead
to undefined behavior.

Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
2015-12-11 14:57:05 +00:00
Francois Gouget
65b60250d0 server: Rename red_get_monotonic_time() to spice_get_monotonic_time_ns()
This is a generic function not tied to the red_xxx functionality and the
new name clarifies that it returns the time in nanoseconds (unlike
g_get_monotonic_time()).

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-12-11 12:43:26 +00:00
Frediano Ziglio
bf1e139875 dcc: reduce statement wrapping
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-12-03 10:41:46 +00:00
Marc-André Lureau
5c93b2b4d2 worker: remove some unnecessary inline
Acked-by: Pavel Grunt <pgrunt@redhat.com>
2015-11-27 11:47:10 +00:00
Marc-André Lureau
203b3cdebf worker: move dcc_send & marshallers to dcc-send.c
Acked-by: Frediano Ziglio <fziglio@redhat.com>
2015-11-27 11:41:51 +00:00