xf86-video-intel: src/sna/sna_accel.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Jul 16 11:44:47 PDT 2013
src/sna/sna_accel.c | 62 +++++++++++++++++++++++++++++++---------------------
1 file changed, 38 insertions(+), 24 deletions(-)
New commits:
commit 34c9b759fbab8d548108e954d55de38c6f5bec31
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Jul 16 19:39:37 2013 +0100
sna: Note that borderClip region may be more than a singular box
If the child is obscured, then borderClip will contain a list of valid
boxes rather a singular extents. I thought this was covered by the
clipList, but I was wrong.
Reported-by: Jesse Barnes <jbarnes at virtuousgeek.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66970
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index fa28b6d..994e993 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -5523,32 +5523,46 @@ sna_do_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc,
* XFree86 DDX empties the border clip when the
* VT is inactive, make sure the region isn't empty
*/
- if (w->parent || RegionNil(&w->borderClip)) {
- int16_t v;
-
- v = max(w->borderClip.extents.x1,
- w->winSize.extents.x1);
- if (region.extents.x1 < v)
- region.extents.x1 = v;
-
- v = max(w->borderClip.extents.y1,
- w->winSize.extents.y1);
- if (region.extents.y1 < v)
- region.extents.y1 = v;
-
- v = min(w->borderClip.extents.x2,
- w->winSize.extents.x2);
- if (region.extents.x2 > v)
- region.extents.x2 = v;
-
- v = min(w->borderClip.extents.y2,
- w->winSize.extents.y2);
- if (region.extents.y2 > v)
- region.extents.y2 = v;
- }
+ assert(!w->winSize.data);
+
+ if (region.extents.x1 < w->winSize.extents.x1)
+ region.extents.x1 = w->winSize.extents.x1;
+ if (region.extents.y1 < w->winSize.extents.y1)
+ region.extents.y1 = w->winSize.extents.y1;
+
+ if (region.extents.x2 > w->winSize.extents.x2)
+ region.extents.x2 = w->winSize.extents.x2;
+ if (region.extents.y2 > w->winSize.extents.y1)
+ region.extents.y2 = w->winSize.extents.y2;
+
+ if (w->borderClip.data == NULL) {
+ if (region.extents.x1 < w->borderClip.extents.x1)
+ region.extents.x1 = w->borderClip.extents.x1;
+ if (region.extents.y1 < w->borderClip.extents.y1)
+ region.extents.y1 = w->borderClip.extents.y1;
+
+ if (region.extents.x2 > w->borderClip.extents.x2)
+ region.extents.x2 = w->borderClip.extents.x2;
+ if (region.extents.y2 > w->borderClip.extents.y1)
+ region.extents.y2 = w->borderClip.extents.y2;
+ } else
+ clip = &w->borderClip;
} else {
+ WindowPtr w = (WindowPtr)src;
+
DBG(("%s: window clip\n", __FUNCTION__));
- clip = &((WindowPtr)src)->clipList;
+ if (w->clipList.data == NULL) {
+ if (region.extents.x1 < w->clipList.extents.x1)
+ region.extents.x1 = w->clipList.extents.x1;
+ if (region.extents.y1 < w->clipList.extents.y1)
+ region.extents.y1 = w->clipList.extents.y1;
+
+ if (region.extents.x2 > w->clipList.extents.x2)
+ region.extents.x2 = w->clipList.extents.x2;
+ if (region.extents.y2 > w->clipList.extents.y1)
+ region.extents.y2 = w->clipList.extents.y2;
+ } else
+ clip = &w->clipList;
}
if (clip == NULL) {
DBG(("%s: fast source clip against extents\n", __FUNCTION__));
More information about the xorg-commit
mailing list