summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/sna_accel.c1
-rw-r--r--src/sna/sna_trapezoids.c35
2 files changed, 34 insertions, 2 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index c7edad63..e996cdb2 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -4736,6 +4736,7 @@ sna_copy_boxes(DrawablePtr src, DrawablePtr dst, GCPtr gc,
goto fallback;
}
+ assert(dst_priv->clear == false);
dst_priv->cpu = false;
if (damage) {
assert(dst_priv->gpu_bo->proxy == NULL);
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c
index 8f2ea34a..289780bd 100644
--- a/src/sna/sna_trapezoids.c
+++ b/src/sna/sna_trapezoids.c
@@ -4855,6 +4855,20 @@ unbounded_pass:
op = 0;
} else {
+ if (src->pDrawable) {
+ if (!sna_drawable_move_to_cpu(src->pDrawable,
+ MOVE_READ)) {
+ mono_fini(&mono);
+ return false;
+ }
+ if (src->alphaMap &&
+ !sna_drawable_move_to_cpu(src->alphaMap->pDrawable,
+ MOVE_READ)) {
+ mono_fini(&mono);
+ return false;
+ }
+ }
+
inplace.composite.dst = image_from_pict(dst, false,
&inplace.composite.dx,
&inplace.composite.dy);
@@ -5091,6 +5105,20 @@ trapezoid_span_inplace__x8r8g8b8(CARD8 op,
} else {
struct pixman_inplace pi;
+ if (src->pDrawable) {
+ if (!sna_drawable_move_to_cpu(src->pDrawable,
+ MOVE_READ)) {
+ tor_fini(&tor);
+ return false;
+ }
+ if (src->alphaMap &&
+ !sna_drawable_move_to_cpu(src->alphaMap->pDrawable,
+ MOVE_READ)) {
+ tor_fini(&tor);
+ return false;
+ }
+ }
+
pi.image = image_from_pict(dst, false, &pi.dx, &pi.dy);
pi.source = image_from_pict(src, false, &pi.sx, &pi.sy);
pi.sx += src_x - pixman_fixed_to_int(traps[0].left.p1.x);
@@ -5519,10 +5547,13 @@ sna_composite_trapezoids(CARD8 op,
force_fallback = FORCE_FALLBACK > 0;
if ((too_small(priv) || DAMAGE_IS_ALL(priv->cpu_damage)) &&
!picture_is_gpu(src)) {
- DBG(("%s: force fallbacks -- dst is too small, %dx%d\n",
+ DBG(("%s: force fallbacks --too small, %dx%d? %d, all-cpu? %d, src-is-cpu? %d\n",
__FUNCTION__,
dst->pDrawable->width,
- dst->pDrawable->height));
+ dst->pDrawable->height,
+ too_small(priv),
+ DAMAGE_IS_ALL(priv->cpu_damage),
+ !picture_is_gpu(src)));
force_fallback = true;
}
if (FORCE_FALLBACK < 0)