Re: [AD] X primitives patch |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Evert Glebbeek wrote:
I haven't tested it yet (I will in a moment and check the drawing mode for rectfill while I'm at it), but one question regarding the line algorithm: does a line drawn by the X11 primitive look the same as a line drawn by Allegro (ie, does it actually select the same pixels)?
Hmm.. well, the vtable for the bitmap only has hline and vline. If the issue was with the line function itself, I doubt it's carried over to the other two. I will check, though.
Also, what about these: - vtable->blit_to_memory = _xwin_blit_anywhere; vtable->blit_from_system = _xwin_blit_anywhere; - vtable->blit_to_system = _xwin_blit_anywhere; ? aren't blit_to_memory and blit_to_system needed anymore with your patch?
Actually they weren't needed in the first place. The way the vtable hack works is, it runs the original memory bitmap vtable function, then updates the X screen area that was drawn to.. however, since the blit_to_memory/system functions don't change the screen (just read from it), there's no reason to waste time updating the X display.
As an aside, do you think it's feasable to use a Pixmap as a system bitmap in X11? Or are there no benefits to be gained there?
I'm not sure actually. Since the screen bitmap (when in matching depths) is the XImage buffer and you need to draw to it anyway incase X needs you to redraw the display, it's really the difference between blitting a Pixmap or an XImage. If it's done right, you may be able to get one less function call and perhaps remove a few clip checks, but I think the benefit would be rather minimal (unless blitting a pixmap is faster than an XImage?).
For non-matching depths, it would ultimately become a question of how fast X's color conversion is compared to Allegro's ASM routines. If they're comparable, you won't get much there either.
- Kitty Cat
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |