sna: Mark the to-be-damaged region first, then Process afterwards

Damage is processed in two phases, with the actual Damage being appended
before the operation is performed so that a copy can be made before
modification (e.g. software cursors).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-10-21 10:46:14 +01:00
parent 60e4e009f9
commit f6eed98fcf
1 changed files with 4 additions and 4 deletions

View File

@ -827,6 +827,10 @@ sna_composite_rectangles(CARD8 op,
goto fallback;
}
/* XXX xserver-1.8: CompositeRects is not tracked by Damage, so we must
* manually append the damaged regions ourselves.
*/
DamageRegionAppend(&pixmap->drawable, &region);
boxes = pixman_region_rectangles(&region, &num_boxes);
/* If we going to be overwriting any CPU damage with a subsequent
@ -984,10 +988,6 @@ fallback_composite:
}
done:
/* XXX xserver-1.8: CompositeRects is not tracked by Damage, so we must
* manually append the damaged regions ourselves.
*/
DamageRegionAppend(&pixmap->drawable, &region);
DamageRegionProcessPending(&pixmap->drawable);
pixman_region_fini(&region);