sna/dri: Only reject DRI2 buffers that are too small for the request blit
The goal is to reject stale DRI2 buffers that are smaller than the
target due to not-yet-handled ConfigureNotify, but not to reject
blitting from Windows that are larger than the frontbuffer.
Fixes a regression from the overzealous
commit b27ecf3059
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Mon Nov 12 14:06:06 2012 +0000
sna/dri: Prevent scheduling a swap on stale buffers
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
98b312e579
commit
50b41cb485
|
|
@ -841,14 +841,23 @@ can_blit(struct sna * sna,
|
|||
DRI2BufferPtr front,
|
||||
DRI2BufferPtr back)
|
||||
{
|
||||
uint32_t f, b;
|
||||
RegionPtr clip;
|
||||
uint32_t s;
|
||||
|
||||
if (draw->type == DRAWABLE_PIXMAP)
|
||||
return true;
|
||||
|
||||
f = get_private(front)->size;
|
||||
b = get_private(back)->size;
|
||||
return (f >> 16) >= (b >> 16) && (f & 0xffff) >= (b & 0xffff);
|
||||
clip = &((WindowPtr)draw)->clipList;
|
||||
|
||||
s = get_private(front)->size;
|
||||
if ((s>>16) < clip->extents.y2 || (s&0xffff) < clip->extents.x2)
|
||||
return false;
|
||||
|
||||
s = get_private(back)->size;
|
||||
if ((s>>16) < clip->extents.y2 || (s&0xffff) < clip->extents.x2)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Reference in New Issue