Gsk.Renderer.new_for_surface
Description: Reference for Gsk.Renderer.new_for_surface

### Constructor

# Gsk Renderernew_for_surface

#### Declaration [src]

    GskRenderer*
    gsk_renderer_new_for_surface (
      GdkSurface* surface
    )

#### Description [src]

Creates an appropriate `GskRenderer` instance for the given `surface`.

If the `GSK_RENDERER` environment variable is set, GSK will try that renderer first, before trying the backend-specific default. The ultimate fallback is the cairo renderer.

The renderer will be realized before it is returned.

#### Parameters

`surface`

  Type: `GdkSurface`

  A `GdkSurface`.

  The data is owned by the caller of the function.

#### Return value

Type: `GskRenderer`

A `GskRenderer`.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.