[haiku-appserver] moving windows using 2D HW ACC

  • From: Adi Oanca <adioanca@xxxxxxxxxxxxxx>
  • To: AppServer <haiku-appserver@xxxxxxxxxxxxx>
  • Date: Tue, 18 Jan 2005 16:23:47 +0200

Hi guys,


        I just realized... the code that I wrote for moving windows is not 
using HW at all!. Here's why:

        Out windows are not perfect rectangles, a partially visible window is 
not a perfect reactangle and the HW only provides ACC for moving a 
perfect rectangle.

        For example, when I'm moving a window I'm saving it's entire contents 
into a (ATM: dynamically allocated) buffer and then paste that into the 
new location. I know it's not good, but ATM it servers its purpose.

        Now, the question is: how do we make this better?
        Well, this is why I write to you, I want you to give in your ideas.

        In the mean time I would like your opinions regarding those:
1. See which is the biggest rectangle in the new window's visible region 
and use 2D ACC to copy from old location. Then copy all other rectangles 
by copying them into main memory and then paste to new location. (that 
is if the new location overlaps the original location, else copy each 
rect using HW ACC)

2. If we are to use double buffering for the entire screen, we can use 
2D ACC to directly copy rect by rect from the front buffer to the second 
one.

Rudolf, what will happen if we use the 2nd option when using VESA 
drivers? I mean... can we request a virtual screen of twice the actual 
resolution and use that area as a backbuffer and flip when needed?
Another question about VESA: does it support blit? Maybe it is a dumb 
question but I just don't know...

Thanks,
Adi

Other related posts: