summaryrefslogtreecommitdiff
path: root/server/display-channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'server/display-channel.c')
-rw-r--r--server/display-channel.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/server/display-channel.c b/server/display-channel.c
index 25d7a5be..c3b85646 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -312,7 +312,7 @@ static void streams_update_visible_region(DisplayChannel *display, Drawable *dra
}
FOREACH_DCC(display, link, next, dcc) {
- agent = &dcc->stream_agents[get_stream_id(display, stream)];
+ agent = dcc_get_stream_agent(dcc, get_stream_id(display, stream));
if (region_intersects(&agent->vis_region, &drawable->tree_item.base.rgn)) {
region_exclude(&agent->vis_region, &drawable->tree_item.base.rgn);
@@ -1302,7 +1302,7 @@ void display_channel_free_some(DisplayChannel *display)
spice_debug("#draw=%d, #glz_draw=%d", display->drawable_count,
display->glz_drawable_count);
FOREACH_DCC(display, link, next, dcc) {
- GlzSharedDictionary *glz_dict = dcc ? dcc->glz_dict : NULL;
+ GlzSharedDictionary *glz_dict = dcc_get_glz_dictionary(dcc);
if (glz_dict) {
// encoding using the dictionary is prevented since the following operations might
@@ -1317,7 +1317,7 @@ void display_channel_free_some(DisplayChannel *display)
}
FOREACH_DCC(display, link, next, dcc) {
- GlzSharedDictionary *glz_dict = dcc ? dcc->glz_dict : NULL;
+ GlzSharedDictionary *glz_dict = dcc_get_glz_dictionary(dcc);
if (glz_dict) {
pthread_rwlock_unlock(&glz_dict->encode_lock);
@@ -2128,16 +2128,16 @@ void display_channel_process_surface_cmd(DisplayChannel *display, RedSurfaceCmd
void display_channel_update_compression(DisplayChannel *display, DisplayChannelClient *dcc)
{
- if (dcc->jpeg_state == SPICE_WAN_COMPRESSION_AUTO) {
- display->enable_jpeg = dcc->common.is_low_bandwidth;
+ if (dcc_get_jpeg_state(dcc) == SPICE_WAN_COMPRESSION_AUTO) {
+ display->enable_jpeg = ((CommonGraphicsChannelClient*)dcc)->is_low_bandwidth;
} else {
- display->enable_jpeg = (dcc->jpeg_state == SPICE_WAN_COMPRESSION_ALWAYS);
+ display->enable_jpeg = (dcc_get_jpeg_state(dcc) == SPICE_WAN_COMPRESSION_ALWAYS);
}
- if (dcc->zlib_glz_state == SPICE_WAN_COMPRESSION_AUTO) {
- display->enable_zlib_glz_wrap = dcc->common.is_low_bandwidth;
+ if (dcc_get_zlib_glz_state(dcc) == SPICE_WAN_COMPRESSION_AUTO) {
+ display->enable_zlib_glz_wrap = ((CommonGraphicsChannelClient*)dcc)->is_low_bandwidth;
} else {
- display->enable_zlib_glz_wrap = (dcc->zlib_glz_state == SPICE_WAN_COMPRESSION_ALWAYS);
+ display->enable_zlib_glz_wrap = (dcc_get_zlib_glz_state(dcc) == SPICE_WAN_COMPRESSION_ALWAYS);
}
spice_info("jpeg %s", display->enable_jpeg ? "enabled" : "disabled");
spice_info("zlib-over-glz %s", display->enable_zlib_glz_wrap ? "enabled" : "disabled");