Discussion:
[directfb-users] resize a DFBSurface
d***@free.fr
2012-10-24 10:57:28 UTC
Permalink
Hello

I wanted to know what was the best way to resize a DFBSurface created by "CreateSurface".
I've seen that there was a resizeSurface function but only for surfaces that are created via a directFBWindow.
I've tried to call again CreateSurface on the same surface changing only the DFBSurfaceDescription width/height and it seems to work, but if I do it without first releasing the surface, do I risk memory leak?
Thank you for your help

Sincerely

YOLIN Dominique
Denis Oliver Kropp
2012-10-31 12:34:20 UTC
Permalink
Post by d***@free.fr
Hello
I wanted to know what was the best way to resize a DFBSurface created by "CreateSurface".
I've seen that there was a resizeSurface function but only for surfaces that are created via a directFBWindow.
I've tried to call again CreateSurface on the same surface changing only the DFBSurfaceDescription width/height and it seems to work, but if I do it without first releasing the surface, do I risk memory leak?
Thank you for your help
If you release the old one, and having a new surface interface pointer is ok for you, then you can use recreation for resizing.

We were also thinking about adding a resize method in IDirectFBSurface.
--
Denis Oliver Kropp
DirectFB integrated media GmbH
Loading...