Efl.Gfx.Buffer.buffer_map

Description

Map a region of this buffer for read or write access by the CPU.

Fetches data from the GPU if needed. This operation may be slow if cpu_readable_fast or cpu_writeable_fast are not true, or if the required colorspace is different from the internal one.

Note that if the buffer has Efl.Gfx.Buffer.buffer_borders, then x and y may be negative.

Signature

buffer_map @pure_virtual {
    params {
        @in mode: Efl.Gfx.Buffer_Access_Mode;
        @in region: ptr(const(Eina.Rect)) @optional;
        @in cspace: Efl.Gfx.Colorspace @optional;
        @in plane: int @optional;
        @out stride: int @optional;
    }
    return: Eina.Rw_Slice;
}

C signature

Eina_Rw_Slice efl_gfx_buffer_map(Eo *obj, Efl_Gfx_Buffer_Access_Mode mode, const Eina_Rect *region, Efl_Gfx_Colorspace cspace, int plane, int *stride);

Parameters

  • mode (in) - Specifies whether to map for read-only, write-only or read-write access (OR combination of flags).
  • region (in) - The region to map.
  • cspace (in) - Requested colorspace. If different from the internal cspace, map should try to convert the data into a new buffer. argb8888 by default.
  • plane (in) - Plane ID. 0 by default. Useful for planar formats only.
  • stride (out) - Returns the length in bytes of a mapped line

Implemented by