sna: Mark overwriting CopyArea as not needing the dst damage

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-06-20 19:40:44 +01:00
parent b3d1118bbe
commit 94cbe7bf7b
1 changed files with 2 additions and 4 deletions

View File

@ -2693,7 +2693,7 @@ sna_drawable_move_to_cpu(DrawablePtr drawable, unsigned flags)
return sna_drawable_move_region_to_cpu(&pixmap->drawable, &region, flags);
}
static bool alu_overwrites(uint8_t alu)
pure static bool alu_overwrites(uint8_t alu)
{
switch (alu) {
case GXclear:
@ -4700,10 +4700,8 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
list_del(&dst_priv->flush_list);
dst_priv->cpu = false;
}
if (region->data == NULL)
hint |= IGNORE_CPU;
}
if (replaces)
if (alu_overwrites(alu))
hint |= IGNORE_CPU;
/* XXX hack for firefox -- subsequent uses of src will be corrupt! */