diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-19 17:20:45 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-08-19 17:20:45 +0100 |
commit | dc83ef49f9e8ff94ab77aa9d54fe29e32b9d7a3d (patch) | |
tree | 0015844f324be9c792ae7eca3388d5fce9a84bf1 /src/sna/sna_trapezoids.c | |
parent | 47d948f5df0cd0e975cfe5183b6ce79cd3fd27ee (diff) |
sna/trapezoids: Accept more operators for maybe-inplace
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_trapezoids.c')
-rw-r--r-- | src/sna/sna_trapezoids.c | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c index 0dcb971a..6cc03f9a 100644 --- a/src/sna/sna_trapezoids.c +++ b/src/sna/sna_trapezoids.c @@ -4671,22 +4671,41 @@ trapezoid_spans_maybe_inplace(CARD8 op, PicturePtr src, PicturePtr dst, if (is_mono(dst, maskFormat)) goto out; - if (!sna_picture_is_solid(src, NULL)) - return false; - switch ((int)dst->format) { case PICT_a8: + if (!sna_picture_is_solid(src, NULL)) + return false; + + switch (op) { + case PictOpIn: + case PictOpAdd: + case PictOpSrc: + break; + default: + return false; + } + break; + case PICT_x8r8g8b8: case PICT_a8r8g8b8: - break; - default: - return false; - } + if (picture_is_gpu(src)) + return false; - switch (op) { - case PictOpIn: - case PictOpAdd: - case PictOpSrc: + switch (op) { + case PictOpOver: + case PictOpAdd: + case PictOpOutReverse: + break; + case PictOpSrc: + if (sna_picture_is_solid(src, NULL)) + break; + + if (!sna_drawable_is_clear(dst->pDrawable)) + return false; + break; + default: + return false; + } break; default: return false; |