summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-19 07:40:16 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-19 07:40:16 +0100
commitf4b930318c68e0e07d677ebc7b4caa27912561db (patch)
tree1c30a913aaf4d91470193ec10991271de568619b /src/sna
parentc257c936b42b92827b784cee0b7caa54e6040364 (diff)
sna/dri2: Replace assertion with code to skip updating the back buffer
After a window resize or redirection, the DRI2BufferPtr become stale but it may take a while for the Client to notice and reconfigure. Just skip touching stale backbuffers and let the Client catch up. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/sna_dri2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index e689a34a..cfe65f44 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -139,6 +139,9 @@ sna_dri2_get_back(struct sna *sna,
struct kgem_bo *bo;
uint32_t name;
+ if ((draw->height << 16 | draw->width) != get_private(back)->size)
+ return;
+
get_private(back)->stale = false;
bo = get_private(back)->bo;
@@ -249,7 +252,6 @@ sna_dri2_reuse_buffer(DrawablePtr draw, DRI2BufferPtr buffer)
buffer->attachment, get_private(buffer)->bo->handle, buffer->name));
assert(get_private(buffer)->refcnt);
assert(get_private(buffer)->bo->refcnt > get_private(buffer)->bo->active_scanout);
- assert(get_private(buffer)->pixmap == NULL || get_private(buffer)->pixmap == get_drawable_pixmap(draw));
if (buffer->attachment == DRI2BufferBackLeft &&
draw->type != DRAWABLE_PIXMAP) {