home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!era!feit
- From: feit@ERA.COM (Mark Feit)
- Subject: Re: Success! Eureka! Cancel that last post...
- Message-ID: <1992Dec14.185340.17751@ERA.COM>
- Sender: feit@ERA.COM (Mark Feit)
- Organization: Engineering Research Associates, Vienna, VA
- Date: Mon, 14 Dec 1992 18:53:40 GMT
- Lines: 45
-
- On comp.windows.x, esr@snark.thyrsus.com (Eric S. Raymond) posts:
- > The bad news is that the way I found to make this work was to use a
- > series of XFillRectangle() calls in place of a single
- > XFillRectangles(). I now believe that there is a bug or undocumented
- > limit in the generic XFillRectangles code itself that was causing this
- > problem.
-
- The deep dark truth of the matter is that your server (everybody's,
- actually) has a limit on the number of bytes that can be transmitted
- in a single request. The XFillRectangles() function (on the source
- tape in mit/lib/X/XDrRects.c, if you're interested) isn't smart enough
- to split large requests into multiple batches, and anything beyond the
- limit gets tossed.
-
- The limit on the number of rectangles you can draw in a single call to
- XFillRectangles() is easy to figure out:
-
- max_rectangles = ((XMaxRequestSize(display) * 4) - 12) / 8
-
- The 12 bytes that get subtracted are for the request header, which
- contains an opcode, the length of the request, a drawable and the GC
- to be used. That leaves the remaining space for rectangles at 8 bytes
- a pop.
-
- I look at this approach as a hack (necessary, for now), since you
- still have to know something about the underlying protocol before you
- can figure out how many rectangles (or whatever) can be sent. A fix
- for this isn't difficult and should probably be put in place for other
- similar functions. Chances are that if the protocol changes sometime
- in the future and the Xlib interface doesn't, some programs are going
- to stop working.
-
- Would someone in the know care to comment on why it is the way it is
- and whether or not there are any plans to make the fix?
-
- - Mark
-
- ................................. .................................
- : Mark A. Feit KD4TAJ : Internet: feit@era.com :
- : Engineering Research Associates : USENET: ...!uunet!era!feit :
- ................................. .................................
- "Keep BSD Free -- Boycott AT&T"
-
-
-
-