sna: Return early if the Drawable box exactly matches one CRTC
If we are trying to find the best coverage, then by definition if the drawable is an exact match for one CRTC, we can stop looking. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
de28027ffc
commit
bc8b191ef6
|
|
@ -2739,6 +2739,11 @@ sna_covering_crtc(ScrnInfoPtr scrn,
|
|||
__FUNCTION__, c,
|
||||
crtc->bounds.x1, crtc->bounds.y1,
|
||||
crtc->bounds.x2, crtc->bounds.y2));
|
||||
if (*(const uint64_t *)box == *(uint64_t *)&crtc->bounds) {
|
||||
DBG(("%s: box exactly matches crtc [%d]\n",
|
||||
__FUNCTION__, c));
|
||||
return crtc;
|
||||
}
|
||||
|
||||
if (!sna_box_intersect(&cover_box, &crtc->bounds, box))
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue