Re: Abort glyph rendering if everything is clipped

2003-10-15 Thread Alexandre Julliard
[EMAIL PROTECTED] writes: > It looks to me like LPtoDP is just doing a linear transform, so the area should > be preserved - the rectangle should be empty after the transform if and only if > it is empty before the transform. > > Or am I missing something? Is there another reason to move the IsRe

Re: Abort glyph rendering if everything is clipped

2003-10-15 Thread Warren_Baird
> That looks better yes; it's still a bit complex IMO, but I'm not sure > it's possible to do much better with that glyph index thing. Still I'm > wondering if you shouldn't do the IsRectEmpty check after the LPtoDP > and coordinates swap. It looks to me like LPtoDP is just doing a linear trans

Re: Abort glyph rendering if everything is clipped

2003-10-11 Thread Alexandre Julliard
[EMAIL PROTECTED] writes: > if(flags & (ETO_CLIPPED | ETO_OPAQUE)) { > if(!lprect) { > if(flags & ETO_CLIPPED) { > if(glyphs != wstr) HeapFree(GetProcessHeap(), 0, glyphs); > return FALSE; > } > GetTextExtentPointI(hdc, glyphs, count, &sz)

Re: Abort glyph rendering if everything is clipped

2003-10-09 Thread Warren_Baird
> But then you are doing extra work for the "normal" case, and you are > also making the code less readable; not a good trade-off IMO. Well --- trading a memory allocation for an extra comparision instruction makes it a bit trickier to decide, but I take your point. > You > could always move

Re: Abort glyph rendering if everything is clipped

2003-10-08 Thread Alexandre Julliard
[EMAIL PROTECTED] writes: > Well, it was intended as an optimization - if we move the check down to the "if > (flags & (ETO_CLIPPED) ..." clause, we may end up doing a HeapAlloc, and calls > to GetGlyphIndices and GetObject that we don't need to do. I'd much rather bail > out as soon as we can an

Re: Abort glyph rendering if everything is clipped

2003-10-08 Thread Warren_Baird
> It would be better IMO to do that as part of the clip rectangle > calculation a few lines below. Well, it was intended as an optimization - if we move the check down to the "if (flags & (ETO_CLIPPED) ..." clause, we may end up doing a HeapAlloc, and calls to GetGlyphIndices and GetObject that

Re: Abort glyph rendering if everything is clipped

2003-10-07 Thread Alexandre Julliard
[EMAIL PROTECTED] writes: > (See attached file: patch_xrender_abort_if_clipped.txt) It would be better IMO to do that as part of the clip rectangle calculation a few lines below. -- Alexandre Julliard [EMAIL PROTECTED]

Re: Abort glyph rendering if everything is clipped

2003-10-07 Thread Dimitrie O. Paun
On Tue, 7 Oct 2003 [EMAIL PROTECTED] wrote: Nit: why not use IsRectEmpty() ? -- Dimi.