On Friday 22 June 2007 12:52, Ville Syrjälä wrote:
> 1. If the window is double buffered the changes are transferred from the
> window's back buffer to the front buffer. If only a portion of the
> window was changed, the changed region will be copied, if the whole
> window was changed the buffers will simply be flipped.
Ah. Okay, so this sounds like that in order to make sure that I only flip the
back and front I have to composite things myself. I am trying to make sure
that the whole window is flipped each time and have any copying happen ONLY
to the back buffer.
> 2. The wm will update the layer's back buffer in the region that
> was occupied by the changed region of the window. Note that there may
> be multiple windows visible in that region (due to blending and color
> keying), so the wm will combine the data from each windows' front
> buffer to produce the final image.
Okay, this sounds like what I want.
> 3. The wm will then flip the layer's surface to make the changes
> visible. It will only flip the changed region so typically this also
> involves a copy operation instead of a real flip.
Which is not what I want. Hmmmm.... sounds like in order to make sure I have
tear free operations I am going to have to:
1. do the compositing on an offscreen display buffer
2. blit the offscreen display buffer to the back buffer
3. flip the entire display
Is this coming closer to the model of DFB?
> At one time I was thinking about changing the wm to have a separate thread
> which would just do something like:
>
> while (true) {
> wait_for_vsync();
> flip();
> }
>
> That should produce tear free screen updates. Of course there must be
> some way to get the changes from latest front buffer to the previous
> front buffer. Probably easiest would be to copy the whole front buffer
> to the back buffer however that might be a bit too heavy, so it would
> should probably only copy the changed regions back.
You are right, however, no matter what one does, it sounds like there is going
to be some copying going on...
Please let me know if I came close to getting things right....
Cheers,
Lloyd
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users