diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-16 22:43:26 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-16 22:43:26 +0100 |
commit | fed9ca236a0b5bbd7f1d137aa4ef9c2caf26719c (patch) | |
tree | 7ff5293da9b524391ee07b29531e494b41d25aa0 | |
parent | 18e274425d728baa62445dc091cae6b1eab94a89 (diff) | |
download | xorg-driver-xf86-video-intel-fed9ca236a0b5bbd7f1d137aa4ef9c2caf26719c.tar.gz |
sna/video: Turn off passthrough if given a zero name
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_video_overlay.c | 3 | ||||
-rw-r--r-- | src/sna/sna_video_sprite.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/sna/sna_video_overlay.c b/src/sna/sna_video_overlay.c index 7dc74b75..0b53e6e8 100644 --- a/src/sna/sna_video_overlay.c +++ b/src/sna/sna_video_overlay.c @@ -541,6 +541,9 @@ sna_video_overlay_put_image(ClientPtr client, DBG(("%s: using passthough, name=%d\n", __FUNCTION__, *(uint32_t *)buf)); + if (*(uint32_t*)buf == 0) + goto invisible; + frame.bo = kgem_create_for_name(&sna->kgem, *(uint32_t*)buf); if (frame.bo == NULL) { DBG(("%s: failed to open bo\n", __FUNCTION__)); diff --git a/src/sna/sna_video_sprite.c b/src/sna/sna_video_sprite.c index dbcb4709..0323e461 100644 --- a/src/sna/sna_video_sprite.c +++ b/src/sna/sna_video_sprite.c @@ -373,6 +373,9 @@ static int sna_video_sprite_put_image(ClientPtr client, DBG(("%s: using passthough, name=%d\n", __FUNCTION__, *(uint32_t *)buf)); + if (*(uint32_t*)buf == 0) + goto invisible; + frame.bo = kgem_create_for_name(&sna->kgem, *(uint32_t*)buf); if (frame.bo == NULL) return BadAlloc; |