View Single Post
Posts: 355 | Thanked: 598 times | Joined on Sep 2009 @ Nizhny Novgorod, Russia
#104
auouymous, now it is implemented as follows:
* offscreen buffer always contains UI in 'normal' orientation
* when widget wants to be repainted it paints itself into buffer in 'normal' orientation
* then part of buffer which was updated goes to window with rotating to corresponding orientation

So, UI orientation doesn't affect widget drawing code at all, and this is good. But with this approach scrolling actually cause most of the buffer to be rotated at every frame. And I think this is most expensive part.

But if we don't want to rotate buffer every time, the buffer will need to contain widgets in rotated form and all widget drawing operations need to be rotated individually while painting into the buffer. I think this might be slower...

To be able to scroll in already rotated buffer we will need either draw all widgets with rotation of every operation or introduce new buffer in the chain which will store existing one in rotated form. And we will need a smart code that will do scrolling in both buffers individually... I think this is too complex and one more blitting can slow down drawing...

Last edited by Mitrandir; 2011-09-28 at 07:21.