sna: Defer CPU fallback if fb calls into mi
If the fb routine does not access the pixel data directly, but instead calls into an mi routine, we can defer the readback and possibly avoid it. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
c348b69f66
commit
17acaf8e23
|
|
@ -2365,6 +2365,14 @@ sna_poly_line(DrawablePtr drawable, GCPtr gc,
|
|||
}
|
||||
|
||||
fallback:
|
||||
if (gc->lineWidth) {
|
||||
if (gc->lineStyle != LineSolid)
|
||||
miWideDash(drawable, gc, mode, n, pt);
|
||||
else
|
||||
miWideLine(drawable, gc, mode, n, pt);
|
||||
return;
|
||||
}
|
||||
|
||||
DBG(("%s: fallback\n", __FUNCTION__));
|
||||
region_set(®ion, &extents);
|
||||
region_maybe_clip(®ion, gc->pCompositeClip);
|
||||
|
|
@ -2670,6 +2678,11 @@ sna_poly_segment(DrawablePtr drawable, GCPtr gc, int n, xSegment *seg)
|
|||
}
|
||||
|
||||
fallback:
|
||||
if (gc->lineWidth) {
|
||||
miPolySegment(drawable, gc, n, seg);
|
||||
return;
|
||||
}
|
||||
|
||||
DBG(("%s: fallback\n", __FUNCTION__));
|
||||
region_set(®ion, &extents);
|
||||
region_maybe_clip(®ion, gc->pCompositeClip);
|
||||
|
|
@ -2774,6 +2787,11 @@ sna_poly_arc(DrawablePtr drawable, GCPtr gc, int n, xArc *arc)
|
|||
}
|
||||
|
||||
fallback:
|
||||
if (gc->lineWidth) {
|
||||
miPolyArc(drawable, gc, n, arc);
|
||||
return;
|
||||
}
|
||||
|
||||
region_set(®ion, &extents);
|
||||
region_maybe_clip(®ion, gc->pCompositeClip);
|
||||
if (!RegionNotEmpty(®ion))
|
||||
|
|
@ -2783,6 +2801,7 @@ fallback:
|
|||
sna_drawable_move_region_to_cpu(drawable, ®ion, true);
|
||||
RegionUninit(®ion);
|
||||
|
||||
/* XXX may still fallthrough to miZeroPolyArc */
|
||||
fbPolyArc(drawable, gc, n, arc);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue