[PATCH v2 x11perf 3/3] Omit benchmarks reading contents of window that is larger than screen.

Michel Dänzer michel at daenzer.net
Tue Feb 1 01:08:40 PST 2011


On Die, 2011-02-01 at 10:59 +0200, Rami Ylimäki wrote: 
> On 01/31/2011 06:08 PM, Michel Dänzer wrote:
> > On Mon, 2011-01-31 at 15:48 +0200, Rami Ylimäki wrote:
> >> Signed-off-by: Rami Ylimäki<rami.ylimaki at vincit.fi>
> >> ---
> >>   do_blt.c |   10 ++++++++++
> >>   1 files changed, 10 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/do_blt.c b/do_blt.c
> >> index 4be2836..fae9e1d 100644
> >> --- a/do_blt.c
> >> +++ b/do_blt.c
> >> @@ -208,6 +208,16 @@ InitCopyPix(XParms xp, Parms p, int reps)
> >>   int
> >>   InitGetImage(XParms xp, Parms p, int reps)
> >>   {
> >> +    int screenWidth = DisplayWidth(xp->d, xp->vinfo.screen);
> >> +    int screenHeight = DisplayHeight(xp->d, xp->vinfo.screen);
> >> +
> >> +    if ((windowWidth>  screenWidth) || (windowHeight>  screenHeight))
> >> +    {
> >> +        printf("Can't read contents of %dx%d window on %dx%d screen, benchmark omitted\n",
> >> +               windowWidth, windowHeight, screenWidth, screenHeight);
> >> +        return False;
> >> +    }
> >> +
> > This will only catch tests which end up calling InitGetImage.
> >
> 
> Do you mean that XGetImage is also called elsewhere in x11perf and the 
> patch doesn't touch those locations?
> 
> The XGetImage call in InitGetImage is the only one that is done with 
> invalid parameters causing a BadMatch error. With this patch, I'm able 
> to run x11perf with all tests without terminating prematurely because of 
> an X error. I have tested this with a device that has a small screen and 
> also with Xephyr using a small window.

I guess I misunderstood the intention of this patch. I thought it was
supposed to catch all tests with operations that can't fit in the
window, resulting in inconsistent numbers.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-devel mailing list