sna/video: Turn off passthrough if given a zero name

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2013-08-16 22:43:26 +01:00
parent 18e274425d
commit fed9ca236a
2 changed files with 6 additions and 0 deletions

View File

@ -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__));

View File

@ -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;