diff options
Diffstat (limited to 'src/sna/sna_composite.c')
-rw-r--r-- | src/sna/sna_composite.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c index ae63e683..17cc68c1 100644 --- a/src/sna/sna_composite.c +++ b/src/sna/sna_composite.c @@ -933,8 +933,9 @@ sna_composite_rectangles(CARD8 op, sna_damage_destroy(&priv->cpu_damage); list_del(&priv->flush_list); } - if (region_subsumes_drawable(®ion, &pixmap->drawable) || - box_inplace(pixmap, ®ion.extents)) { + if (region_subsumes_drawable(®ion, &pixmap->drawable)) + hint |= REPLACES; + if (hint & REPLACES || box_inplace(pixmap, ®ion.extents)) { DBG(("%s: promoting to full GPU\n", __FUNCTION__)); if (priv->gpu_bo && priv->cpu_damage == NULL) { assert(priv->gpu_bo->proxy == NULL); @@ -958,6 +959,8 @@ sna_composite_rectangles(CARD8 op, DBG(("%s: fallback due to no GPU bo\n", __FUNCTION__)); goto fallback; } + if (hint & REPLACES) + kgem_bo_undo(&sna->kgem, bo); if (!sna->render.fill_boxes(sna, op, dst->format, color, pixmap, bo, boxes, num_boxes)) { |