### Constructor

# WPEPlatform BufferDMABuf new

#### Declaration [src]

    WPEBufferDMABuf*
    wpe_buffer_dma_buf_new (
      WPEView* view,
      int width,
      int height,
      guint32 format,
      guint32 n_planes,
      int* fds,
      guint32* offsets,
      guint32* strides,
      guint64 modifier
    )

#### Description [src]

Create a new `WPEBufferDMABuf` for the given parameters. The buffer will take the ownership of the `fds`.

#### Parameters

`view`

  Type: `WPEView`

  A `WPEView`.

  The data is owned by the caller of the function.

`width`

  Type: `int`

  The buffer width.

`height`

  Type: `int`

  The buffer height.

`format`

  Type: `guint32`

  The buffer format.

`n_planes`

  Type: `guint32`

  The number of planes.

`fds`

  Type: `int*`

  The buffer file descriptors.

  The data is owned by the caller of the function.

`offsets`

  Type: `guint32*`

  The buffer offsets.

  The data is owned by the caller of the function.

`strides`

  Type: `guint32*`

  The buffer strides.

  The data is owned by the caller of the function.

`modifier`

  Type: `guint64`

  The buffer modifier.

#### Return value

Type: `WPEBufferDMABuf`

A `WPEBufferDMABuf`.

The caller of the function takes ownership of the data, and is responsible for freeing it.