Kieran Bingham wrote:
> Hi Guys,
> 
> I've created a Surface in an image provider (needed to blit from).
> 
>          static CoreSurface                *raw_data_srf = NULL;
> 
>          /* create surface of DSPF_A8. ( BYTE sized for Raw Data ) */
>          if ( dfb_surface_create ( dfb_fbdev->core,
>                                   data->payload_size,            /* Width of
> surface - the number of bytes we want to store */
>                                    1,                            /* Height
> of surface - 1 pixel, or 8 bits in A8 */
>                                   DSPF_A8,                         /*
> DFBSurfacePixelFormat : A8 ( or any 8bit format ) */
>                                   CSP_VIDEOONLY,                   /*
> CoreSurfacePolicy :VID memory only. ... if this fails - we fail */
>                                   caps,                            /*
> DFBSurfaceCapabilities caps, */
>                                   NULL,                         /*
> CorePalette *palette, */
>                                   &raw_data_srf) )            /* CoreSurface
> **ret_surface */
>                  return DFB_NOVIDEOMEMORY;                    /* If we can't
> create a Video Memory Surface we can't blit */
> 
> 
> I'd like to destroy it in the Image Provider Destructor.
> 
>   What is the correct way to destroy my raw_data_srf ?

dfb_surface_unref() was correct. Did you also destroy any CardState that
you used?

-- 
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to