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:
parent
18e274425d
commit
fed9ca236a
|
|
@ -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__));
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue