sna: Decrease latency for 1x1 GetImage by using an inplace mapping
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
2c2a8d3780
commit
79d468925b
|
|
@ -11982,8 +11982,9 @@ sna_get_image(DrawablePtr drawable,
|
|||
char *dst)
|
||||
{
|
||||
RegionRec region;
|
||||
unsigned int flags;
|
||||
|
||||
DBG(("%s (%d, %d, %d, %d)\n", __FUNCTION__, x, y, w, h));
|
||||
DBG(("%s (%d, %d)x(%d, %d)\n", __FUNCTION__, x, y, w, h));
|
||||
|
||||
region.extents.x1 = x + drawable->x;
|
||||
region.extents.y1 = y + drawable->y;
|
||||
|
|
@ -11991,7 +11992,10 @@ sna_get_image(DrawablePtr drawable,
|
|||
region.extents.y2 = region.extents.y1 + h;
|
||||
region.data = NULL;
|
||||
|
||||
if (!sna_drawable_move_region_to_cpu(drawable, ®ion, MOVE_READ))
|
||||
flags = MOVE_READ;
|
||||
if ((w | h) == 1)
|
||||
flags |= MOVE_INPLACE_HINT;
|
||||
if (!sna_drawable_move_region_to_cpu(drawable, ®ion, flags))
|
||||
return;
|
||||
|
||||
if (format == ZPixmap &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue