Re: XShrinkRegion() distorts shape



On 9 Dec 2010 15:33:11 GMT
jt@xxxxxxxxxxx (Jens Thoms Toerring) wrote:
From what you've said I fear you may be right. I suppose I shouldn't be
surprised that theres yet another poorly implemented feature in core Xlib.

What's "poorly implemented" about that? XLib is a the most

Umm , it doesn't work properly? I'd call that poorly implemented unless
you have a better definition.

low-level library. It isn't supposed to be hyper-clever, it
is supposed to be fast and small in terms of memort usage,
so that other people can write clever libraries on top of it,
not worrying about the speed of what they are building on.

Thats all very well , but if you can't be bothered to implement a feature
properly then don't bother to implement it at all. No one is going to
build a library on top of a broken feature, they'll simply write their
own version.

And storing all kinds of information about a shape a region
was created from could require a lot of memory and, to use

Far less memory I expect than images, stipples, tiles , pixmaps etc.

that information, a lot of computational effort that only a
very tiny percentage of the users would ever need. So it's

The XFill functionality isn't computationally simple either but they managed
to make that work properly.

actually need them. It's a bit like blaming a pixel format
for stroing a graphic for not being a vector format.

If I gave the server a pixmap and I wrote it to the screen corrupted then I
would blame it.

Or use a more clever algorithm, where you create a region from
the largest triangle that you ever expect to use, keep that and
shrink a copy of it each time instead of shrinking the original
region and then trying to blow it up again. That should take care
of all problems regarding distortions.

You're assuming the struct can be copied manually without any issues. What
if some implementations use pointers or heap memory internally? These
structures are supposed to be black boxes only updated via the API.

B2003

.



Relevant Pages

  • Re: question on union
    ... Is it a feature of 'union'? ... Why could not we use 'struct' to check how bytes are placed in memory? ... The elements in a structure all occupy separate and distinct ...
    (comp.lang.c)
  • Re: [RFC] BadRAM still not ready for inclusion ? (was: Re: Free Linux Driver Development!)
    ... BadRAM in more detail is at http://www.linuxjournal.com/article/4489 ... 200 lines of code which will have to be maintained forever, once it becomes a supported feature, for the benefit of the few people who can't or won't replace bad memory. ... While memory with "bad spots" was common a decade ago, it's as likely with current memory that the memory will "throw a bad bit" once in a while, on a read or write anywhere in the marginal or bad chip. ... There are some patches I would love to see in mainline, like suspend2 which includes resume as well as suspend, but this is not one of them, hope I've explained why. ...
    (Linux-Kernel)
  • =?iso-8859-15?Q?Re:_[RFC]_BadRAM_still_not_ready_for_inclusion_=3F_(wa?= =?iso-8859-
    ... maybe this patch is just something very special, having many pro's but also con's - so this also could be one reason why it exists for so long outside mainline. ... BadRAM let's you tell the kernel to skip certain regions of ram, ... forever, once it becomes a supported feature, for the benefit of the few ... people who can't or won't replace bad memory. ...
    (Linux-Kernel)
  • Re: Straw poll: What browser do you use?
    ... memory with its process-per-tab feature. ... and you'll notice your browser using much less memory. ... both for network access and disk ... RAM Firefox does, because its feature set is substantially smaller. ...
    (Debian-User)
  • Re: [EXT4 set 8][PATCH 1/1]Add journal checksums
    ... A new user-visible feature should be accompanied by an update to ... * validate the data journaling mode. ... struct journal_head *descriptor; ... changed the on-disk format of the journal commit blocks. ...
    (Linux-Kernel)