diff options
author | Frediano Ziglio <freddy77@gmail.com> | 2021-06-01 21:45:36 +0100 |
---|---|---|
committer | Frediano Ziglio <freddy77@gmail.com> | 2023-11-22 07:39:19 +0000 |
commit | d80abf0b3d78d0e6c62ef7eb64cf5742ba143b3d (patch) | |
tree | d3400aceaf0cc3173a405fe912317e722c214e2c | |
parent | 1d5a2b657f5ffdcc8868b9f865a5ed620627d255 (diff) |
SAVEsurface_ref
but I think loop is wrong, ring get changed
-rw-r--r-- | server/display-channel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/display-channel.cpp b/server/display-channel.cpp index d16465c0..779cf388 100644 --- a/server/display-channel.cpp +++ b/server/display-channel.cpp @@ -786,7 +786,7 @@ static bool current_add_with_shadow(DisplayChannel *display, Drawable *item) .y = red_drawable->u.copy_bits.src_pos.y - red_drawable->bbox.top }; - Shadow *shadow = shadow_new(&item->tree_item, &delta); + Shadow *shadow = shadow_new(&item->tree_item, &delta); if (!shadow) { stat_add(&display->priv->add_stat, start_time); return FALSE; @@ -840,8 +840,8 @@ static bool current_add(DisplayChannel *display, Drawable *drawable) spice_assert(!region_is_empty(&item->rgn)); region_init(&exclude_rgn); - auto it = drawable->surface->current.begin(); - const auto end = drawable->surface->current.end(); + auto it = ring.begin(); + const auto end = ring.end(); /* check whether the new drawable region intersects any of the items * already in the 'current' ring */ @@ -1805,14 +1805,14 @@ static void draw_until(DisplayChannel *display, RedSurface *surface, Drawable *l static Drawable* current_find_intersects_rect(RedSurface *surface, SurfaceDrawableRing::iterator it, const SpiceRect *area) { - auto *current = &surface->current_list; QRegion rgn; Drawable *last = nullptr; region_init(&rgn); region_add(&rgn, area); - for (; it != current->end(); ++it) { + const auto end = surface->current_list.end(); + for (; it != end; ++it) { if (region_intersects(&rgn, &it->tree_item.rgn)) { last = &*it; break; |