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 » Developing U++ » U++ Developers corner » Should we double-buffer by default?
Should we double-buffer by default? [message #4053] Tue, 18 July 2006 15:23 Go to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
I am in process of refactoring U++ painting engine.

This is quite complicated topic, much more complicated than it seems, if the goal is to avoid flickering e.g. when resizing windows.

There of course is "simple" solution to avoid flickering forever - full window double-buffering.

So far, I stayed away from this, taking the hard approach and using double-buffering just for areas that really need it (namely areas covered by transparent Ctrls).

This leads to very complicated algorithm and the results are questionable. Now I have tried to benchmark the new (improved) painting engine in several modes on both my A64 and venerable testing NT4.0 Celeron@433Mhz with 4MB S3 VGA and 96MB ram. Numbers are time for "repaint the window when resizing" routine:

1. raw mode - no backbuffering:
A64 - 2.8 ms
Celeron433 - 90 ms

2. full window backbuffering:
A64 - 2.4 ms
Cel433 - 115 ms
note that this mode could be probably further improved a little bit...

3. multirun mode - in this mode, transparent areas are doublebuffered and painted one by one:
A64 - 8.8 ms
Cel433 - 266 ms

4. single run mode - single back buffer is created for all transparent area and they are painted in single run:
A64 - 6 ms
Cel433 - 145 ms

Looks like trying to be smart does not really pay off...

Now reading Qt docs, since Qt4.0 they do doublebuffering as the only option. Should not we too? (OK, this whole message is for Daniel in the first place... Wink

Mirek
 
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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: let's discuss new Draw principles and problems...
Next Topic: A list of SQL dialects to support (eventually)..
Goto Forum:
  


Current Time: Sun Jun 08 17:38:46 CEST 2025

Total time taken to generate the page: 0.04313 seconds