### Virtual Method

# Cogl Onscreen swap_region

#### Declaration [src]

    void
    swap_region (
      CoglOnscreen* onscreen,
      const MtkRegion* region,
      CoglFrameInfo* info,
      gpointer user_data
    )

#### Description [src]

Swaps a region of the back buffer being rendered too, to the front for display.

This function also implicitly discards the contents of the color, depth and stencil buffers as if `cogl_framebuffer_discard_buffers()` were used. The significance of the discard is that you should not expect to be able to start a new frame that incrementally builds on the contents of the previous frame.

#### Parameters

`region`

  Type: `MtkRegion`

  A region.

  The data is owned by the caller of the method.

`info`

  Type: `CoglFrameInfo`

  No description available.

  The data is owned by the caller of the method.

`user_data`

  Type: `gpointer`

  No description available.

  The argument can be `NULL`.
  The data is owned by the caller of the method.