summaryrefslogtreecommitdiff
path: root/src/lib/evas/Evas_GL.h
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-09-02 21:29:25 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-10-20 12:16:07 +0900
commitde7a8a3dab14d917b9e914e3b3c7fb44679dd708 (patch)
tree927e2d74a2c2141802b83c4eb9d0a6370f5b7610 /src/lib/evas/Evas_GL.h
parentd3ff6dfa7f1d95b0feee595414d69ac43bc1b3e3 (diff)
Evas GL: Add API evas_gl_rotation_get
This will be used to increase the chances of having direct rendering (no fallback to FBO) even if the window is rotated. The client is then responsible for handling the view rotation. @feature
Diffstat (limited to 'src/lib/evas/Evas_GL.h')
-rw-r--r--src/lib/evas/Evas_GL.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/lib/evas/Evas_GL.h b/src/lib/evas/Evas_GL.h
index 2a51825fc7..8c7f68f7b5 100644
--- a/src/lib/evas/Evas_GL.h
+++ b/src/lib/evas/Evas_GL.h
@@ -424,7 +424,10 @@ typedef enum _Evas_GL_Stencil_Bits
424typedef enum _Evas_GL_Options_Bits 424typedef enum _Evas_GL_Options_Bits
425{ 425{
426 EVAS_GL_OPTIONS_NONE = 0, /**< No extra options */ 426 EVAS_GL_OPTIONS_NONE = 0, /**< No extra options */
427 EVAS_GL_OPTIONS_DIRECT = (1<<0) /**< Optional hint to allow rendering directly to evas' window when possible */ 427 EVAS_GL_OPTIONS_DIRECT = (1<<0),/**< Optional hint to allow rendering directly to the Evas window if possible */
428 EVAS_GL_OPTIONS_CLIENT_SIDE_ROTATION = (1<<1) /**< Force direct rendering even if the canvas is rotated.
429 * In that case, it is the application's role to rotate the contents of
430 * the Evas_GL view. @see evas_gl_rotation_get. @since 1.12 */
428} Evas_GL_Options_Bits; 431} Evas_GL_Options_Bits;
429 432
430/** 433/**
@@ -577,6 +580,31 @@ EAPI Eina_Bool evas_gl_native_surface_get (Evas_GL *evas_gl, Evas
577EAPI Evas_GL_API *evas_gl_api_get (Evas_GL *evas_gl) EINA_ARG_NONNULL(1); 580EAPI Evas_GL_API *evas_gl_api_get (Evas_GL *evas_gl) EINA_ARG_NONNULL(1);
578 581
579/** 582/**
583 * @brief Get the current rotation of the view, in degrees.
584 *
585 * This function should be called in order to properly handle the current
586 * rotation of the view. It will always return 0 unless the option
587 * @ref EVAS_GL_OPTIONS_CLIENT_SIDE_ROTATION has been set.
588 *
589 * Indeed, in case of direct rendering to the back buffer, the client
590 * application is responsible for properly rotating its view. This can generally
591 * be done by applying a rotation to a view matrix.
592 *
593 * @param[in] evas_gl The current Evas_GL object
594 *
595 * @note The returned value may not be the same as the window rotation, for
596 * example if indirect rendering is used as a fallback, or if the GPU supports
597 * transparent rotation of the buffer during swap.
598 *
599 * @return 0, 90, 180 or 270 depending on the Evas canvas' orientation.
600 *
601 * @see EVAS_GL_OPTIONS_CLIENT_SIDE_ROTATION
602 *
603 * @since 1.12
604 */
605EAPI int evas_gl_rotation_get (Evas_GL *evas_gl) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
606
607/**
580 * @brief Returns the last error of any evas_gl function called in the current thread. 608 * @brief Returns the last error of any evas_gl function called in the current thread.
581 * Initially, the error is set to @ref EVAS_GL_SUCCESS. A call to @ref evas_gl_error_get 609 * Initially, the error is set to @ref EVAS_GL_SUCCESS. A call to @ref evas_gl_error_get
582 * resets the error to @ref EVAS_GL_SUCCESS. 610 * resets the error to @ref EVAS_GL_SUCCESS.