Re: [AD] character clipping proposal

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


On Wed, 2008-05-14 at 16:44 +0200, deleveld@xxxxxxxxxx wrote:
> Hi everyone,
> 
> I noticed that text output in Allegro doesn't consider clipping  
> conditions and renders each character of the string even when it can  
> be easily determined that characters will be fully clipped.
> 
> Here is a patch on 4.2.2 that incorporates character based clipping to  
> mono_render and color_render.  The unclipped rendering speed is not  
> slowed down by any detectable amount but the clipped drawing speed is  
> quite a bit faster.  It's hard to say exactly how much faster since  
> test.exe chooses different clipping conditions all the time and  
> profiling doesnt(?) check drawing with clipping.

My guess is, there won't be a big difference, because each character
does an initial check against the clip rect. Still, makes a lot of sense
to check for the clipping rectangle higher up of course.

> The patch is very simple and should be easily translatable to WIP  
> versions.  I cant test them because the WIP versions dont compile for  
> me.
> 

Does 4.3.10 also not compile? It's the same code, and any bugs in the
build system should be fixed before (if ever) releasing it as 4.4.0.

For 4.9.x, the whole font rendering code has been rewritten, so the
patch would of course not apply.

-- 
Elias Pschernig <elias@xxxxxxxxxx>





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