[haiku-appserver] Re: resize operation

  • From: Adi Oanca <adioanca@xxxxxxxxxxxxxx>
  • To: haiku-appserver@xxxxxxxxxxxxx
  • Date: Tue, 07 Jun 2005 16:58:15 +0300


DarkWyrm wrote:
> <snip>
>>We can do better, the problem is how?
>>  - in the first case I can copy child2 to the right using HW acc.
>>  - in the 2nd case I can copy child1 to the bottom using HW acc.
>>  - in the 3rd case I can copy _only one_ of them using HW acc,
>>the other being completely redrawn. The problem is: which one
>>should I copy? The obvious answer would be: copy in the direction
>>that has the biggest area of right or bottom aligned views. BUT,
>>should I spend CPU cycles and memory to calculate which area is
>>the biggest? Is it feasible? (BTW, same could be done for bottom-
>>aligned ones)
>>      The approach I took was to always copy right aligned views,
>>but that is not of much use when resizing on the vertical.
>>What should I do?
> Why can we only draw one of them with HW acceleration?

        Because CopyRegion only accepts a single offset. And in the
case of different alignments, there are as much as 3 offsets. (right,
bottom, and right-bottom alignments) Doing a CopyRegion one time, may
have already covered the source region of the 2nd CopyRegion operation
for example.

> In any event, you might want to test the calculate-and-accelerate 
> method. Most likely, you either get a speedup or at least be no better 
> off than before. It's worth looking into, anyway.


Other ideas?


Other related posts: