diff options
author | Jonathon Jongsma <jjongsma@redhat.com> | 2015-11-13 10:29:15 -0600 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2015-11-16 13:36:08 +0000 |
commit | a26b4daf98ed7866a7f241e81cd021902d219b8a (patch) | |
tree | e90f7fda166b3c8ea15c6cda465a3d3c24627fc0 /server/red_worker.c | |
parent | 1e8b2fe324b7d5afacc2652cffe22eab65f7b2c6 (diff) | |
download | spice-a26b4daf98ed7866a7f241e81cd021902d219b8a.tar.gz spice-a26b4daf98ed7866a7f241e81cd021902d219b8a.tar.xz spice-a26b4daf98ed7866a7f241e81cd021902d219b8a.zip |
Move some more drawable functions to display channel
Acked-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Diffstat (limited to 'server/red_worker.c')
-rw-r--r-- | server/red_worker.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/server/red_worker.c b/server/red_worker.c index f8df8376..3a718fdb 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -2065,18 +2065,6 @@ static void display_channel_stream_maintenance(DisplayChannel *display, } } -static inline int is_drawable_independent_from_surfaces(Drawable *drawable) -{ - int x; - - for (x = 0; x < 3; ++x) { - if (drawable->surface_deps[x] != -1) { - return FALSE; - } - } - return TRUE; -} - static inline int red_current_add_equal(RedWorker *worker, DrawItem *item, TreeItem *other) { DisplayChannel *display = worker->display_channel; @@ -2347,15 +2335,6 @@ static inline int current_add(RedWorker *worker, Ring *ring, Drawable *drawable) return TRUE; } -static void add_clip_rects(QRegion *rgn, SpiceClipRects *data) -{ - int i; - - for (i = 0; i < data->num_rects; i++) { - region_add(rgn, data->rects + i); - } -} - static inline int current_add_with_shadow(RedWorker *worker, Ring *ring, Drawable *item) { DisplayChannel *display = worker->display_channel; @@ -2400,11 +2379,6 @@ static inline int current_add_with_shadow(RedWorker *worker, Ring *ring, Drawabl return TRUE; } -static inline int has_shadow(RedDrawable *drawable) -{ - return drawable->type == QXL_COPY_BITS; -} - static void drawable_update_streamable(DisplayChannel *display, Drawable *drawable) { RedDrawable *red_drawable = drawable->red_drawable; @@ -2762,7 +2736,7 @@ static inline void red_process_draw(RedWorker *worker, RedDrawable *red_drawable QRegion rgn; region_init(&rgn); - add_clip_rects(&rgn, red_drawable->clip.rects); + region_add_clip_rects(&rgn, red_drawable->clip.rects); region_and(&drawable->tree_item.base.rgn, &rgn); region_destroy(&rgn); } @@ -5201,7 +5175,7 @@ static void surface_lossy_region_update(RedWorker *worker, DisplayChannelClient region_init(&clip_rgn); region_init(&draw_region); region_add(&draw_region, &drawable->bbox); - add_clip_rects(&clip_rgn, drawable->clip.rects); + region_add_clip_rects(&clip_rgn, drawable->clip.rects); region_and(&draw_region, &clip_rgn); if (lossy) { region_or(surface_lossy_region, &draw_region); |