Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
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 %. Smile

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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New parallelization pattern with CoWork
Next Topic: Minor ide iml image designer changes and improvements
Goto Forum:
  


Current Time: Sun Aug 24 13:16:28 CEST 2025

Total time taken to generate the page: 0.04815 seconds