Tizen Native API
5.0
|
Cairo GL/Evas_GL APIs are official APIs for Tizen.
#include <cairo-evas-gl.h>
In Tizen, Cairo provides gl backend in order to do hardware-accelerated rendering. Since the EGL is not public supported in Tizen, Cairo Evas_GL has been provided to user interfaces instead to allow indirect access to EGL layer.
Features :
Remarks :
Functions | |
cairo_public cairo_surface_t * | cairo_gl_surface_create (cairo_device_t *device, cairo_content_t content, int width, int height) |
Create a cairo GL surface using the device as the underlying rendering system. | |
cairo_public cairo_surface_t * | cairo_gl_surface_create_for_texture (cairo_device_t *abstract_device, cairo_content_t content, unsigned int tex, int width, int height) |
Create a cairo GL surface using the texture as the render target, and the device as the underlying rendering system. The content must match the format of the texture CAIRO_CONTENT_ALPHA <-> GL_ALPHA CAIRO_CONTENT_COLOR <-> GL_RGB/GL_BGR CAIRO_CONTENT_COLOR_ALPHA <-> GL_RGBA/GL_BGRA . | |
cairo_public int | cairo_gl_surface_get_width (cairo_surface_t *abstract_surface) |
Returns the width of given cairo surface object. | |
cairo_public int | cairo_gl_surface_get_height (cairo_surface_t *abstract_surface) |
Returns the height of given cairo surface object. | |
cairo_public void | cairo_gl_device_set_thread_aware (cairo_device_t *device, cairo_bool_t thread_aware) |
Cairo can be used in multithreaded environment. By default, cairo switches out the current GL context after each draw finishes. This API tells cairo not to switch GL context if no other thread uses cairo for rendering. In carefully designed application, there should be a single, dedicated rendering thread. . | |
cairo_public cairo_device_t * | cairo_evas_gl_device_create (Evas_GL *evas_gl, Evas_GL_Context *evas_context) |
Creates and returns a new cairo_device structure for interface to underlying rendering system. | |
cairo_public cairo_surface_t * | cairo_gl_surface_create_for_evas_gl (cairo_device_t *device, Evas_GL_Surface *evas_surface, Evas_GL_Config *evas_config, int width, int height) |
Creates and returns a new cairo_surface structure for representing Evas_GL_Surface object that cairo can render to. | |
cairo_public Evas_GL * | cairo_evas_gl_device_get_gl (cairo_device_t *device) |
Returns the underlying Evas_GL object used to create cairo device object. | |
cairo_public Evas_GL_Context * | cairo_evas_gl_device_get_context (cairo_device_t *device) |
Returns the underlying Evas_GL_Context object used to create cairo device object. |
cairo_public cairo_device_t* cairo_evas_gl_device_create | ( | Evas_GL * | evas_gl, |
Evas_GL_Context * | evas_context | ||
) |
Creates and returns a new cairo_device structure for interface to underlying rendering system.
[in] | evas_gl | The given Evas_gl object |
[in] | evas_context | The given Evas GL Context object |
cairo_public Evas_GL_Context* cairo_evas_gl_device_get_context | ( | cairo_device_t * | device | ) |
Returns the underlying Evas_GL_Context object used to create cairo device object.
[in] | device | The given cairo_device_t represents the driver interface to underlying rendering system |
cairo_public Evas_GL* cairo_evas_gl_device_get_gl | ( | cairo_device_t * | device | ) |
Returns the underlying Evas_GL object used to create cairo device object.
[in] | device | The given cairo_device_t represents the driver interface to underlying rendering system |
cairo_public void cairo_gl_device_set_thread_aware | ( | cairo_device_t * | device, |
cairo_bool_t | thread_aware | ||
) |
Cairo can be used in multithreaded environment.
By default, cairo switches out the current GL context after each draw finishes.
This API tells cairo not to switch GL context if no other thread uses cairo for rendering.
In carefully designed application, there should be a single, dedicated rendering thread.
.
[in] | device | The given cairo_device structure for the interface to underlying rendering system |
[in] | thread_aware | Set this value as FALSE to choose non-thread-aware mode |
cairo_public cairo_surface_t* cairo_gl_surface_create | ( | cairo_device_t * | device, |
cairo_content_t | content, | ||
int | width, | ||
int | height | ||
) |
Create a cairo GL surface using the device as the underlying rendering system.
[in] | device | The given cairo_device_t represents the driver interface to underlying rendering system |
[in] | content | Type of content in the surface |
[in] | width | Width of the surface, in pixels |
[in] | height | Height of the surface, in pixels |
cairo_public cairo_surface_t* cairo_gl_surface_create_for_evas_gl | ( | cairo_device_t * | device, |
Evas_GL_Surface * | evas_surface, | ||
Evas_GL_Config * | evas_config, | ||
int | width, | ||
int | height | ||
) |
Creates and returns a new cairo_surface structure for representing Evas_GL_Surface object that cairo can render to.
[in] | device | The given cairo_device structure for the interface to underlying rendering system |
[in] | evas_surface | The given Evas_GL_Surface object for GL Rendering |
[in] | evas_config | The pixel format and configuration of the rendering surface |
[in] | width | The width of the surface |
[in] | height | The height of the surface |
cairo_public cairo_surface_t* cairo_gl_surface_create_for_texture | ( | cairo_device_t * | abstract_device, |
cairo_content_t | content, | ||
unsigned int | tex, | ||
int | width, | ||
int | height | ||
) |
Create a cairo GL surface using the texture as the render target, and the device as the underlying rendering system.
The content must match the format of the texture
CAIRO_CONTENT_ALPHA <-> GL_ALPHA
CAIRO_CONTENT_COLOR <-> GL_RGB/GL_BGR
CAIRO_CONTENT_COLOR_ALPHA <-> GL_RGBA/GL_BGRA
.
[in] | abstract_device | The given cairo_device_t represents the driver interface to underlying rendering system |
[in] | content | Type of content in the surface |
[in] | tex | Name of texture to use for storage of surface pixels |
[in] | width | Width of the surface, in pixels |
[in] | height | Height of the surface, in pixels |
cairo_public int cairo_gl_surface_get_height | ( | cairo_surface_t * | abstract_surface | ) |
Returns the height of given cairo surface object.
[in] | abstract_surface | The given cairo_surface_t object |
cairo_public int cairo_gl_surface_get_width | ( | cairo_surface_t * | abstract_surface | ) |
Returns the width of given cairo surface object.
[in] | abstract_surface | The given cairo_surface_t object |