Home » Community » U++ community news and announcements » BufferPainter now MT optimized
Re: BufferPainter now MT optimized [message #49213 is a reply to message #49203] |
Mon, 08 January 2018 10:37  |
Tom1
Messages: 1305 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi Mirek,
OK, now I've tested with a very long dashed line only partially visible in the view. The performance improvement with PreClip() and PreClipDashed() is (obviously) similar: 2.5x speed compared to running without any PreClip. Using PreClipDashed(), instead of on-the-fly switching of PreClip(), removes any rendering issues thereof. So, I suggest obsoleting the old PreClip() altogether. PreClipDashed() does it all.
Does this even need to be selectable anymore? There does not seem to be any performance penalty for ordinary (solid) strokes.
I still had to use Begin()/End() to enclose dashed strokes. Otherwise, some solid strokes came out as dashed. Then I noticed that the Begin()/End() pair was (an expensive) way to put the stroking back to solid mode after drawing dashed strokes. Calling Dash(""); before every solid stroke removed the need for such usage of Begin()/End(). Is Dash(""); the cheapest way to return to solid stroking?
Please note: Getting rid of extra Begin()/End() pairs nicely improved overall rendering performance by some 5-10 %. 
Thanks and best regards,
Tom
Update: After further consideration, I decided to do all dashed strokes by the sequence of "painter.Dash(x); painter.Stroke(); painter.Dash("");". This keeps the default line style solid. It also lowers the number of calls to Dash(); because most of the strokes are solid anyway.
[Updated on: Mon, 08 January 2018 11:32] Report message to a moderator
|
|
|
 |
|
BufferPainter now MT optimized
By: mirek on Tue, 26 December 2017 11:52
|
 |
|
Re: BufferPainter now MT optimized
By: Tom1 on Fri, 29 December 2017 13:07
|
 |
|
Re: BufferPainter now MT optimized
By: Tom1 on Fri, 29 December 2017 16:00
|
 |
|
Re: BufferPainter now MT optimized
By: mirek on Fri, 29 December 2017 17:39
|
 |
|
Re: BufferPainter now MT optimized
By: Tom1 on Tue, 02 January 2018 15:34
|
 |
|
Re: BufferPainter now MT optimized
By: mirek on Tue, 02 January 2018 16:51
|
 |
|
Re: BufferPainter now MT optimized
By: Tom1 on Wed, 03 January 2018 09:04
|
 |
|
Re: BufferPainter now MT optimized
By: Tom1 on Sat, 06 January 2018 11:33
|
 |
|
Re: BufferPainter now MT optimized
By: mirek on Sat, 06 January 2018 13:14
|
 |
|
Re: BufferPainter now MT optimized
By: Tom1 on Sat, 06 January 2018 15:45
|
 |
|
Re: BufferPainter now MT optimized
By: mirek on Sat, 06 January 2018 20:35
|
 |
|
Re: BufferPainter now MT optimized
By: mirek on Sat, 06 January 2018 21:16
|
 |
|
Re: BufferPainter now MT optimized
By: Tom1 on Sun, 07 January 2018 00:06
|
 |
|
Re: BufferPainter now MT optimized
By: mirek on Sun, 07 January 2018 00:24
|
 |
|
Re: BufferPainter now MT optimized
By: Tom1 on Mon, 08 January 2018 10:37
|
Goto Forum:
Current Time: Sun Aug 24 18:50:52 CEST 2025
Total time taken to generate the page: 0.05139 seconds
|