Quoting Unger Richard:
> Hi!
>
> I was pretty confused about the DFB notions of windows, surfaces and layers.
> Reading the PDFs from the documentation/architecture section of the DFB site
> cleared things up for me a little...
>
> Basically, the way I understand it now (experts please correct me if anything
> I write is wrong!!):
>
> Surfaces are simply pixel buffers, areas in System or Video RAM for storing
> pixels in defined formats. Depending on the capabilities of your hardware,
> drawing operations and pixel-copies ('blits') may be accellerated or not.
> DirectFB hides this from you by providing software implementations for
> unaccellerated operations.
>
> Layers are associated with the graphics hardware, and represent a 'screen' in
> some abstract sense. A given graphics card should have at least one layer,
> but may offer more - either because it supports more screens, or because it
> supports 'overlay' layers or something like that. The details really depend
> on the hardware.
> The important thing is that a layer is associated with a primary surface - an
> area you can draw into to make things appear on the screen. For hardware that
> supports more than one layer on the same screen what is actually seen depends
> on how the layers are combined to form the image.
>
> As I understand it, each surface in directfb is completely 'mapped'
> (allocated) in memory (either system or video). That includes the primary
> surface of a layer. So anything you draw to that surface will 'stick' until
> you draw over it again, within that surface. Drawing to the surface of
> another layer might affect the image you see if the two layers 'belong' to
> the same screen, but that is handled by the hardware or directfb. The
> surfaces of the layers are independant pixel buffers. So as I understand it
> you would only need to draw your background into the background layer once.
>
> Whether or not you need to Flip the primary surface of a layer depends only
> on whether that surface is double buffered, and is independant of the rest of
> this discussion...
Well understood :)
Maybe it's written in the document, but there's no primary surface of a layer.
There's just a primary surface as an abstraction (or simplification) of the API.
The surface of a layer is just the surface of the layer. But the primary surface
of an application might be the surface of a layer or the surface of a window.
Anyways, you're right that only drawing to a layer's surface (single buffered)
directly is visible without a flip. With an exception of the 'simulating' system
modules like SDL or X11 that require a flip even on single buffered layers for
calling SDL_UpdateRects() for example.
--
Best regards,
Denis Oliver Kropp
.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/ |
"------------------------------------------"
_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users