|Summary:||XftDrawSetClipRectangles early return|
|Product:||xorg||Reporter:||Owen Taylor <otaylor>|
|Component:||Lib/Xft||Assignee:||Keith Packard <keithp>|
|Status:||CLOSED FIXED||QA Contact:|
|i915 platform:||i915 features:|
Description Owen Taylor 2003-06-08 10:38:00 UTC
/* * Check for quick exit */ if (draw->clip_type == XftClipTypeRectangles && !memcmp (XftClipRects (draw->clip.rect), rects, n * sizeof (XRectangle))) Exists without regard to n, xOrigin, yOrigin. This in, among other things, means that setting to an empty region (n == 0) always returns immediately. The attached (untested) patch should fix the problem ... the check: (n == 0 || (draw->clip.rect.xOrigin == xOrigin && draw->clip.rect.yOrigin == yOrigin)) counts on xOrigin/yOrigin being irrelevant for empty clips and on there being no way to change the clip region/rects without setting the origin.
Comment 1 Owen Taylor 2003-06-08 10:39:24 UTC
Created attachment 47 [details] [review] Proposed patch
Comment 2 Keith Packard 2003-06-08 12:41:56 UTC
I'll take a look at the patch tomorrow.
Comment 3 Keith Packard 2003-06-17 10:38:00 UTC
I've applied a working version of the submitted patch.