diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-22 13:39:47 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-22 13:42:37 +0100 |
commit | 5189ba727fe48990f00d5787c53d7b15fa1838a4 (patch) | |
tree | 6cc9348667a6cd5bd72c61012422694e54f568b5 /src/sna | |
parent | 62e42de300275a668a326357d454062221714fe8 (diff) |
sna: Refine the self-cow copy hack to reduce collateral damage
Sergio Callegari found a case in LibreOffice that copied cloned pixmaps
onto each other and then modified one of the pair. This was triggering
the hack put in to speed up firefox scrolling, unfortunately.
Reported-by: Sergio Callegari <sergio.callegari@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=65665
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r-- | src/sna/sna_accel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 44b87cde..c8d40881 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -4807,8 +4807,10 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc, hint |= IGNORE_CPU; /* XXX hack for firefox -- subsequent uses of src will be corrupt! */ - if (src_priv && src_priv->cow && src_priv->gpu_bo == dst_priv->gpu_bo) { - DBG(("%s: discarding cow reference for cousin copy\n", + if (src_priv && + COW(src_priv->cow) == COW(dst_priv->cow) && + IS_COW_OWNER(dst_priv->cow)) { + DBG(("%s: ignoring cow reference for cousin copy\n", __FUNCTION__)); assert(src_priv->cpu_damage == NULL); bo = dst_priv->gpu_bo; |