Re: [AD] XOR drawing under X11 (and what is _xwin_in_gfx_call)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, 2004-11-25 at 16:57 -0800, Chris wrote:
> Elias Pschernig wrote:
> > Therefore, I made the attached patch, which simply removes direct XOR
> > drawing again. Immediately everything works perfectly. And since it's
> > hard for me to keep overview in long functions, I split the direct
> > updating into separate functions.. the optimizer will inline them again
> > anyway.
> 
> The patch looks mostly alright. A few things though.. The direct_* 
> functions should probably be prefixed with _xwin just like all the other 
> X11 functions. 

Yes, I must admit, I tried sneaking in that naming change :) The
underscore should only be used for non-static functions IMHO. I think
that's how it is already handled in other parts of the source (not in
the x11 ones). Probably should update hacking.txt with info about this.

> You also missed tagging them as inline. I also think 

Yes, gcc will inline them either way - but inlining can't hurt. It
should be AL_INLINE then. And for 4.3.x, let's drop AL_INLINE as well as
AL_STATIC. The only compiler without them must be sunos gcc 2.8.1 or
something :P

> drawing_mode_ok should only be set TRUE if matching_formats is true as 
> well as _drawing_mode is DRAW_MODE_SOLID (this will make it so you only 
> have to test drawing_mode_ok instead of both that and matching_formats).
> 

Ah, yes, good idea.

> I attached an updated patch.
> 
> > I'm almost sure now this is only for the signals version - just not sure
> > how it works. If something wants to draw while drawing is in progress,
> > it only updates the back-buffer(?)
> 
> Right (and even then, only if it's drawing to the memory bitmap itself, 
> not the display). Although if that ever happened, then the display would 
> never be updated with the second drawing operation, unless it happened 
> to be inside the same area as the first (which would cause its own 
> problems).

Yes. So very odd. Would need to find Michail Bukin or Geroge Foot and
ask them what this is about :)

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/