summaryrefslogtreecommitdiff
path: root/src/lib/evas/Evas_GL.h
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-07-17 13:47:30 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-07-17 14:47:53 +0900
commit6c3793390f1504225016bef0603d2c774b2b0e72 (patch)
treea2cbe2fd014b63bd28ee56e96c6a24b446edb4a2 /src/lib/evas/Evas_GL.h
parentdc3e41c3ded18ff14568604580d2681a7581f4c0 (diff)
Evas GL: Some documentation on sync objects
Diffstat (limited to 'src/lib/evas/Evas_GL.h')
-rw-r--r--src/lib/evas/Evas_GL.h95
1 files changed, 84 insertions, 11 deletions
diff --git a/src/lib/evas/Evas_GL.h b/src/lib/evas/Evas_GL.h
index 83890d5b05..a032eaf70f 100644
--- a/src/lib/evas/Evas_GL.h
+++ b/src/lib/evas/Evas_GL.h
@@ -3815,6 +3815,7 @@ typedef unsigned long long EvasGLTime;
3815#define EVAS_GL_KHR_wait_sync 1 3815#define EVAS_GL_KHR_wait_sync 1
3816 3816
3817/** 3817/**
3818 * @anchor evasgl_sync_values
3818 * @name Constants used to define and wait for Sync objects. 3819 * @name Constants used to define and wait for Sync objects.
3819 * @{ 3820 * @{
3820 */ 3821 */
@@ -4461,30 +4462,102 @@ EvasGLImage *img = glapi->evasglCreateImageForContext
4461 /** 4462 /**
4462 * @name Evas GL Sync object functions 4463 * @name Evas GL Sync object functions
4463 * @since_tizen 2.3 4464 * @since_tizen 2.3
4465 * @since 1.12
4464 * @{ */ 4466 * @{ */
4467
4465 /** 4468 /**
4466 * @anchor evasglCreateSync 4469 * @anchor evasglCreateSync
4467 * @brief Requires the extension @c EGL_KHR_fence_sync, similar to eglCreateSyncKHR. 4470 * @brief Create a synchronization primitive which can be tested or waited upon.
4471 *
4472 * @note Requires the extension @c EGL_KHR_fence_sync, similar to eglCreateSyncKHR.
4473 *
4474 * @param evas_gl The current Evas_GL connection
4475 * @param type One of: @c EVAS_GL_SYNC_FENCE or @c EVAS_GL_SYNC_REUSABLE
4476 * @param attrib_list Optional attributes list, terminated by @c EVAS_GL_NONE
4477 * The supported attributes depend on the driver extensions,
4478 * please refer to the EGL specifications for more information.
4479 *
4480 * @return A new sync object (EvasGLSync)
4481 * @since 1.12
4468 */ 4482 */
4469 EvasGLSync (*evasglCreateSync) (Evas_GL *evas_gl, unsigned int type, const int *attrib_list); 4483 EvasGLSync (*evasglCreateSync) (Evas_GL *evas_gl, unsigned int type, const int *attrib_list);
4470 /** @anchor evasglDestroySync 4484 /**
4471 * @brief Requires the extension @c EGL_KHR_fence_sync, similar to eglDestroySyncKHR. 4485 * @anchor evasglDestroySync
4486 * @brief Destroys a sync object created by @c evasglCreateSync.
4487 *
4488 * @note Requires the extension @c EGL_KHR_fence_sync, similar to eglDestroySyncKHR.
4489 *
4490 * @param evas_gl The current Evas_GL connection
4491 * @param sync A valid sync object created by @c evasglCreateSync
4492 *
4493 * @return @c EINA_TRUE in case of success, @c EINA_FALSE in case of failure
4494 * (in which case evas_gl_error_get() should return an error code)
4495 * @since 1.12
4472 */ 4496 */
4473 Eina_Bool (*evasglDestroySync) (Evas_GL *evas_gl, EvasGLSync sync); 4497 Eina_Bool (*evasglDestroySync) (Evas_GL *evas_gl, EvasGLSync sync);
4474 /** @anchor evasglClientWaitSync 4498
4475 * @brief Requires the extension @c EGL_KHR_fence_sync, similar to eglClientWaitSyncKHR. 4499 /**
4500 * @anchor evasglClientWaitSync
4501 * @brief Block and wait until for sync object is signaled or timeout is reached
4502 *
4503 * @param evas_gl The current Evas_GL connection
4504 * @param sync A valid sync object created by evasglCreateSync
4505 * @param timeout A relative timeout in nanoseconds
4506 *
4507 * @note Requires the extension @c EGL_KHR_reusable_sync, similarly to eglClientWaitSyncKHR.
4508 *
4509 * @return @c EVAS_GL_TIMEOUT_EXPIRED if the sync failed and timeout was reached,
4510 * @c EVAS_GL_CONDITION_SATISFIED if the sync was signaled,
4511 * or 0 in case of failure (in which case evas_gl_error_get() should return an error code)
4512 * @since 1.12
4476 */ 4513 */
4477 int (*evasglClientWaitSync) (Evas_GL *evas_gl, EvasGLSync sync, int flags, EvasGLTime timeout); 4514 int (*evasglClientWaitSync) (Evas_GL *evas_gl, EvasGLSync sync, int flags, EvasGLTime timeout);
4478 /** @anchor evasglSignalSync 4515
4479 * @brief Requires the extension @c EGL_KHR_reusable_sync, similar to eglSignalSyncKHR. 4516 /**
4517 * @anchor evasglSignalSync
4518 * @brief Signal a sync object, unlocking all threads waiting on it
4519 *
4520 * @param evas_gl The current Evas_GL connection
4521 * @param sync A valid sync object created by evasglCreateSync
4522 *
4523 * @note Requires the extension @c EGL_KHR_reusable_sync or @c EGL_KHR_wait_sync, similarly to eglSignalSyncKHR.
4524 *
4525 * @return @c EINA_TRUE in case of success, or
4526 * @c EINA_FALSE in case of failure (in which case evas_gl_error_get() should return an error code)
4527 * @since 1.12
4480 */ 4528 */
4481 Eina_Bool (*evasglSignalSync) (Evas_GL *evas_gl, EvasGLSync sync, unsigned mode); 4529 Eina_Bool (*evasglSignalSync) (Evas_GL *evas_gl, EvasGLSync sync, unsigned mode);
4482 /** @anchor evasglGetSyncAttrib 4530
4483 * @brief Requires the extension @c EGL_KHR_fence_sync, similar to eglGetSyncAttribKHR. 4531 /**
4532 * @anchor evasglGetSyncAttrib
4533 * @brief Query a sync object for its properties
4534 *
4535 * @param evas_gl The current Evas_GL connection
4536 * @param sync A valid sync object created by evasglCreateSync
4537 * @param attribute Which attribute to query, can be one of: @c EVAS_GL_SYNC_STATUS, @c EVAS_GL_SYNC_TYPE or @c EVAS_GL_SYNC_CONDITION
4538 * @param value Return value or the query, see @ref evasgl_sync_values "sync object".
4539 *
4540 * @note Requires the extension @c EGL_KHR_fence_sync, similar to eglGetSyncAttribKHR.
4541 *
4542 * @return @c EINA_TRUE in case of success, or
4543 * @c EINA_FALSE in case of failure (in which case evas_gl_error_get() should return an error code)
4544 * @since 1.12
4484 */ 4545 */
4485 Eina_Bool (*evasglGetSyncAttrib) (Evas_GL *evas_gl, EvasGLSync sync, int attribute, int *value); 4546 Eina_Bool (*evasglGetSyncAttrib) (Evas_GL *evas_gl, EvasGLSync sync, int attribute, int *value);
4486 /** @anchor evasglWaitSync 4547
4487 * @brief Requires the extension @c EGL_KHR_wait_sync, similar to eglWaitSyncKHR. 4548 /**
4549 * @anchor evasglWaitSync
4550 * @brief Wait on an EvasGLSync without blocking, see @c EGL_KHR_wait_sync for more information
4551 *
4552 * @param evas_gl The current Evas_GL connection
4553 * @param sync A valid sync object created by evasglCreateSync
4554 * @param flags Must be 0
4555 *
4556 * @note Requires the extension @c EGL_KHR_wait_sync, similar to eglWaitSyncKHR.
4557 *
4558 * @return @c EINA_TRUE in case of success, or
4559 * @c EINA_FALSE in case of failure (in which case evas_gl_error_get() should return an error code)
4560 * @since 1.12
4488 */ 4561 */
4489 int (*evasglWaitSync) (Evas_GL *evas_gl, EvasGLSync sync, int flags); 4562 int (*evasglWaitSync) (Evas_GL *evas_gl, EvasGLSync sync, int flags);
4490 /** @} */ 4563 /** @} */