Denis Oliver Kropp wrote:
Quoting Sorin Otescu:
Hi all,
I'm trying to implement layer resizing and positioning in a custom gfx
driver
and I seems to have run into some problems:
1) everything runs properly until I try to get an IDirectFBDisplayLayer
object
through dfb->GetDisplayLayer(). When I do, the core tries to create a
new video
surface for my layer although there already is an active surface. Is this
normal? In my case it seems the primary layer context != the active layer
context.
Each layer context creates it's own region with its own surface.
2) if i work around this, everything runs fine again, until I try to call
layer->SetScreenRectangle(); the function call succeeds but nothing
happens -
apparently the region is not realized so the changes aren't applied.
What could
be wrong?
How did you work around this?
Through a hack :) - I'm actually using the same surface and I use
reference counting; this works (somewhat) for me because I have a custom
allocator.
Anyway, why does the layer need 2 surfaces? It seems one of them is
never used and it just eats up memory - or am I wrong?
It depends on which layer context is bound to the layer interface. If the
interface is in SHARED or ADMINISTRATIVE mode, it's the primary layer context,
i.e. the shared context (window stack). If the interface is put in EXCLUSIVE
mode, a new (private) layer context is created and activated. The primary layer
context's region is unrealized and the private one is realized.
Ok, so how can I apply the changes in ADMINISTRATIVE mode?
Do you call GetDisplayLayer() more than once? Are you using
CreateSurface(PRIMARY)
in conjunction with the layer interface?
I call CreateSurface(PRIMARY | DOUBLE) before I call GetDisplayLayer()
(which I only call once).
Thanks.
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev