sna: Discard damage tracking for operations to the whole pixmap

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-03-31 11:23:45 +01:00
parent 8f796d4586
commit c4c8a1b180
1 changed files with 12 additions and 0 deletions

View File

@ -3566,6 +3566,18 @@ create_gpu_bo:
if (priv->gpu_damage) {
assert(priv->gpu_bo);
if (!priv->cpu_damage || flags & IGNORE_CPU) {
if (box_covers_pixmap(pixmap, &region.extents)) {
unsigned int move;
if (flags & IGNORE_CPU)
move = MOVE_WRITE;
else
move = MOVE_WRITE | MOVE_READ;
if (sna_pixmap_move_to_gpu(pixmap, move))
goto use_gpu_bo;
}
if (sna_damage_contains_box__no_reduce(priv->gpu_damage,
&region.extents)) {
DBG(("%s: region wholly contained within GPU damage\n",