satish wrote: > Hi all, > > > I'm implementing some directfb applications on an embedded device, > which supports maximum of 5 layers. > > I'm facing the "Out of video Memory" problem, in this case: > > > -Initialised all layers at startup, > -Get an interface to the graphics layer's surface. > -created a new surface and rendered image to it. > -Blitting this newly created surface to the layer surface > (blit to maximum width and height of layer's surface). > -releasing the surface created. > > Now the problem arises when i try to create another new surface > with some image rendered in to it, and try to blit(width & height > of layer) it to in same layer.
That looks like the worst case scenario for an optimization in the state handling. It keeps the source in the state for faster multiple blits from the same source. That means on Blit() the surface is bound to the state until another surface is blitted. So when you do a Release() on the surface to remove your reference, the other reference is still active until you do the next Blit(). At that point the old surface will be actually destructed. That's why it works when two of your images fit into the rest of your video memory. I'm gonna fix that soon. The optimization must be changed to work without influencing the lifetime of the objects. If it's really that you might wanna try this evil hack: pLayerSurface->Blit( pLayerSurface, pLayerSurface, NULL, 9999, 9999 ); It should release the reference to the old image surface and reference itself instead, without doing any harm, because it's clipped completely. -- 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
