diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2015-11-18 14:22:25 +0100 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2015-11-18 14:27:45 +0000 |
commit | 3941d03d116df8213836719dce179d40bf55a6ca (patch) | |
tree | 8c99529d316fa14dec228568ee0fda1946d5cdff /server/display-channel.h | |
parent | b12b248cae9b446bd581bfec081d30de94e97d8d (diff) | |
download | spice-3941d03d116df8213836719dce179d40bf55a6ca.tar.gz spice-3941d03d116df8213836719dce179d40bf55a6ca.tar.xz spice-3941d03d116df8213836719dce179d40bf55a6ca.zip |
worker: move surfaces to DisplayChannel
Ok. this one was painful.Note that in some cases, DCC_TO_DC should be
made safer (there used to be a if !dcc guard in some places, although
that looks wrong anyway)...
Acked-by: Pavel Grunt <pgrunt@redhat.com>
Diffstat (limited to 'server/display-channel.h')
-rw-r--r-- | server/display-channel.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/server/display-channel.h b/server/display-channel.h index 03bbb707..b207e245 100644 --- a/server/display-channel.h +++ b/server/display-channel.h @@ -288,6 +288,30 @@ void monitors_config_unref (MonitorsCo #define NUM_TRACE_ITEMS (1 << TRACE_ITEMS_SHIFT) #define ITEMS_TRACE_MASK (NUM_TRACE_ITEMS - 1) +typedef struct DrawContext { + SpiceCanvas *canvas; + int canvas_draws_on_surface; + int top_down; + uint32_t width; + uint32_t height; + int32_t stride; + uint32_t format; + void *line_0; +} DrawContext; + +typedef struct RedSurface { + uint32_t refs; + Ring current; + Ring current_list; + DrawContext context; + + Ring depend_on_me; + QRegion draw_dirty_region; + + //fix me - better handling here + QXLReleaseInfoExt create, destroy; +} RedSurface; + #define NUM_DRAWABLES 1000 typedef struct _Drawable _Drawable; struct _Drawable { @@ -326,6 +350,10 @@ struct DisplayChannel { uint32_t next_item_trace; uint64_t streams_size_total; + RedSurface surfaces[NUM_SURFACES]; + uint32_t n_surfaces; + SpiceImageSurfaces image_surfaces; + ImageCache image_cache; RedCompressBuf *free_compress_bufs; @@ -384,6 +412,10 @@ int display_channel_get_streams_timeout (DisplayCha void display_channel_compress_stats_print (const DisplayChannel *display); void display_channel_compress_stats_reset (DisplayChannel *display); void display_channel_drawable_unref (DisplayChannel *display, Drawable *drawable); +void display_channel_surface_unref (DisplayChannel *display, + uint32_t surface_id); +bool display_channel_surface_has_canvas (DisplayChannel *display, + uint32_t surface_id); static inline int is_equal_path(SpicePath *path1, SpicePath *path2) { |