On Tue, Apr 26, 2011 at 12:55 PM, Alon Levy <[email protected]> wrote:
> handle_dev_update does area_update, i.e. rendering to a surface (usually
> the primary, surface 0) on request of the driver. Since we only use a single
> canvas for each surface on the device memory (the rest are in host memory),
> this patch may not really be required.
>
> TODO: test without this patch.
>From my limited understanding, this patch doesn't look necessary since
worker->surfaces should have the required state.
So, I wouldn't apply it until we prove it is necessary (not the other
way around).
> ---
> server/red_worker.c | 15 ++++++++-------
> 1 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/server/red_worker.c b/server/red_worker.c
> index 399ebea..550bda9 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -10156,6 +10156,8 @@ static inline void handle_dev_update(RedWorker
> *worker)
> uint32_t num_dirty_rects;
> uint32_t surface_id;
> uint32_t clear_dirty_region;
> + RingItem *link;
> + Surfaces *surfaces;
>
> receive_data(worker->channel, &surface_id, sizeof(uint32_t));
> receive_data(worker->channel, &rect, sizeof(SpiceRect *));
> @@ -10170,18 +10172,17 @@ static inline void handle_dev_update(RedWorker
> *worker)
> validate_surface(&worker->surfaces, surface_id);
> red_update_area(worker, rect, surface_id);
>
> - surface = &worker->surfaces.surfaces[surface_id];
> - region_ret_rects(&surface->draw_dirty_region, dirty_rects,
> num_dirty_rects);
> -
> - if (clear_dirty_region) {
> - region_clear(&surface->draw_dirty_region);
> + SURFACES_FOREACH(link, surfaces, worker) {
> + surface = &surfaces->surfaces[surface_id];
> + region_ret_rects(&surface->draw_dirty_region, dirty_rects,
> num_dirty_rects);
> + if (clear_dirty_region) {
> + region_clear(&surface->draw_dirty_region);
> + }
> }
> -
> message = RED_WORKER_MESSAGE_READY;
> write_message(worker->channel, &message);
> }
>
> -
> static inline void handle_dev_add_memslot(RedWorker *worker)
> {
> RedWorkerMessage message;
> --
> 1.7.4.4
>
> _______________________________________________
> Spice-devel mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>
--
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/spice-devel