YaGL: wait_native removed
authorStanislav Vorobiov <s.vorobiov@samsung.com>
Thu, 16 May 2013 16:09:16 +0000 (20:09 +0400)
committerStanislav Vorobiov <s.vorobiov@samsung.com>
Thu, 16 May 2013 16:09:16 +0000 (20:09 +0400)
wait_native is useless on host, this must be
done on target

hw/yagl_apis/egl/yagl_egl_calls.c
hw/yagl_apis/egl/yagl_host_egl_calls.c
hw/yagl_apis/egl/yagl_host_egl_calls.h
hw/yagl_backends/egl_offscreen/yagl_egl_offscreen.c
hw/yagl_backends/egl_onscreen/yagl_egl_onscreen.c
hw/yagl_drivers/egl_glx/yagl_egl_glx.c
hw/yagl_drivers/egl_wgl/yagl_egl_wgl.c
hw/yagl_egl_backend.h
hw/yagl_egl_driver.h

index d91a4183c481a574a690555b80ca25e0f0373e26..2499d4e2ade7f8f57e43fe50ffa0e55510743670 100644 (file)
@@ -423,44 +423,7 @@ static bool yagl_func_eglQueryContext(uint8_t **out_buff,
 }
 
 /*
- * eglWaitGL dispatcher. id = 21
- */
-static bool yagl_func_eglWaitGL(uint8_t **out_buff,
-    uint8_t *in_buff)
-{
-    YAGL_LOG_FUNC_ENTER_SPLIT0(eglWaitGL);
-    EGLBoolean retval;
-    bool res = yagl_host_eglWaitGL(&retval);
-    if (!res) {
-        YAGL_LOG_FUNC_EXIT(NULL);
-        return false;
-    }
-    YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, retval);
-    yagl_marshal_put_EGLBoolean(&in_buff, retval);
-    return true;
-}
-
-/*
- * eglWaitNative dispatcher. id = 22
- */
-static bool yagl_func_eglWaitNative(uint8_t **out_buff,
-    uint8_t *in_buff)
-{
-    EGLint engine = yagl_marshal_get_EGLint(out_buff);
-    YAGL_LOG_FUNC_ENTER_SPLIT1(eglWaitNative, EGLint, engine);
-    EGLBoolean retval;
-    bool res = yagl_host_eglWaitNative(&retval, engine);
-    if (!res) {
-        YAGL_LOG_FUNC_EXIT(NULL);
-        return false;
-    }
-    YAGL_LOG_FUNC_EXIT_SPLIT(EGLBoolean, retval);
-    yagl_marshal_put_EGLBoolean(&in_buff, retval);
-    return true;
-}
-
-/*
- * eglSwapBuffers dispatcher. id = 23
+ * eglSwapBuffers dispatcher. id = 21
  */
 static bool yagl_func_eglSwapBuffers(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -480,7 +443,7 @@ static bool yagl_func_eglSwapBuffers(uint8_t **out_buff,
 }
 
 /*
- * eglCopyBuffers dispatcher. id = 24
+ * eglCopyBuffers dispatcher. id = 22
  */
 static bool yagl_func_eglCopyBuffers(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -500,7 +463,7 @@ static bool yagl_func_eglCopyBuffers(uint8_t **out_buff,
 }
 
 /*
- * eglCreateImageKHR dispatcher. id = 25
+ * eglCreateImageKHR dispatcher. id = 23
  */
 static bool yagl_func_eglCreateImageKHR(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -523,7 +486,7 @@ static bool yagl_func_eglCreateImageKHR(uint8_t **out_buff,
 }
 
 /*
- * eglDestroyImageKHR dispatcher. id = 26
+ * eglDestroyImageKHR dispatcher. id = 24
  */
 static bool yagl_func_eglDestroyImageKHR(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -543,7 +506,7 @@ static bool yagl_func_eglDestroyImageKHR(uint8_t **out_buff,
 }
 
 /*
- * eglCreateWindowSurfaceOffscreenYAGL dispatcher. id = 27
+ * eglCreateWindowSurfaceOffscreenYAGL dispatcher. id = 25
  */
 static bool yagl_func_eglCreateWindowSurfaceOffscreenYAGL(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -568,7 +531,7 @@ static bool yagl_func_eglCreateWindowSurfaceOffscreenYAGL(uint8_t **out_buff,
 }
 
 /*
- * eglCreatePbufferSurfaceOffscreenYAGL dispatcher. id = 28
+ * eglCreatePbufferSurfaceOffscreenYAGL dispatcher. id = 26
  */
 static bool yagl_func_eglCreatePbufferSurfaceOffscreenYAGL(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -593,7 +556,7 @@ static bool yagl_func_eglCreatePbufferSurfaceOffscreenYAGL(uint8_t **out_buff,
 }
 
 /*
- * eglCreatePixmapSurfaceOffscreenYAGL dispatcher. id = 29
+ * eglCreatePixmapSurfaceOffscreenYAGL dispatcher. id = 27
  */
 static bool yagl_func_eglCreatePixmapSurfaceOffscreenYAGL(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -618,7 +581,7 @@ static bool yagl_func_eglCreatePixmapSurfaceOffscreenYAGL(uint8_t **out_buff,
 }
 
 /*
- * eglResizeOffscreenSurfaceYAGL dispatcher. id = 30
+ * eglResizeOffscreenSurfaceYAGL dispatcher. id = 28
  */
 static bool yagl_func_eglResizeOffscreenSurfaceYAGL(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -642,7 +605,7 @@ static bool yagl_func_eglResizeOffscreenSurfaceYAGL(uint8_t **out_buff,
 }
 
 /*
- * eglUpdateOffscreenImageYAGL dispatcher. id = 31
+ * eglUpdateOffscreenImageYAGL dispatcher. id = 29
  */
 static bool yagl_func_eglUpdateOffscreenImageYAGL(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -660,7 +623,7 @@ static bool yagl_func_eglUpdateOffscreenImageYAGL(uint8_t **out_buff,
 }
 
 /*
- * eglCreateWindowSurfaceOnscreenYAGL dispatcher. id = 32
+ * eglCreateWindowSurfaceOnscreenYAGL dispatcher. id = 30
  */
 static bool yagl_func_eglCreateWindowSurfaceOnscreenYAGL(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -682,7 +645,7 @@ static bool yagl_func_eglCreateWindowSurfaceOnscreenYAGL(uint8_t **out_buff,
 }
 
 /*
- * eglCreatePbufferSurfaceOnscreenYAGL dispatcher. id = 33
+ * eglCreatePbufferSurfaceOnscreenYAGL dispatcher. id = 31
  */
 static bool yagl_func_eglCreatePbufferSurfaceOnscreenYAGL(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -704,7 +667,7 @@ static bool yagl_func_eglCreatePbufferSurfaceOnscreenYAGL(uint8_t **out_buff,
 }
 
 /*
- * eglCreatePixmapSurfaceOnscreenYAGL dispatcher. id = 34
+ * eglCreatePixmapSurfaceOnscreenYAGL dispatcher. id = 32
  */
 static bool yagl_func_eglCreatePixmapSurfaceOnscreenYAGL(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -726,7 +689,7 @@ static bool yagl_func_eglCreatePixmapSurfaceOnscreenYAGL(uint8_t **out_buff,
 }
 
 /*
- * eglInvalidateOnscreenSurfaceYAGL dispatcher. id = 35
+ * eglInvalidateOnscreenSurfaceYAGL dispatcher. id = 33
  */
 static bool yagl_func_eglInvalidateOnscreenSurfaceYAGL(uint8_t **out_buff,
     uint8_t *in_buff)
@@ -740,7 +703,7 @@ static bool yagl_func_eglInvalidateOnscreenSurfaceYAGL(uint8_t **out_buff,
     return res;
 }
 
-const uint32_t yagl_egl_api_num_funcs = 35;
+const uint32_t yagl_egl_api_num_funcs = 33;
 
 yagl_api_func yagl_egl_api_funcs[] = {
     &yagl_func_eglGetError,
@@ -763,8 +726,6 @@ yagl_api_func yagl_egl_api_funcs[] = {
     &yagl_func_eglDestroyContext,
     &yagl_func_eglMakeCurrent,
     &yagl_func_eglQueryContext,
-    &yagl_func_eglWaitGL,
-    &yagl_func_eglWaitNative,
     &yagl_func_eglSwapBuffers,
     &yagl_func_eglCopyBuffers,
     &yagl_func_eglCreateImageKHR,
index 66d1ce678dc8b58564b66bab1699cd406c25c167..71125391c39df05c89b4ffc928766d073ed41e30 100644 (file)
@@ -1445,59 +1445,6 @@ out:
     return res;
 }
 
-bool yagl_host_eglWaitGL(EGLBoolean* retval)
-{
-    EGLBoolean tmp;
-    EGLenum api = egl_api_ts->api;
-
-    if (!yagl_host_eglBindAPI(&tmp, EGL_OPENGL_ES_API)) {
-        return false;
-    }
-
-    if (!yagl_host_eglWaitClient(retval)) {
-        return false;
-    }
-
-    return yagl_host_eglBindAPI(&tmp, api);
-}
-
-bool yagl_host_eglWaitNative(EGLBoolean* retval,
-    EGLint engine)
-{
-    struct yagl_egl_surface *sfc = NULL;
-
-    YAGL_LOG_FUNC_SET(eglWaitNative);
-
-    *retval = EGL_FALSE;
-
-    if (!egl_api_ts->context) {
-        *retval = EGL_TRUE;
-        goto out;
-    }
-
-    if (!egl_api_ts->context->draw) {
-        YAGL_SET_ERR(EGL_BAD_CURRENT_SURFACE);
-        goto out;
-    }
-
-    sfc = yagl_egl_display_acquire_surface(egl_api_ts->context->dpy,
-                                           egl_api_ts->context->draw->res.handle);
-
-    if (!sfc || (sfc != egl_api_ts->context->draw)) {
-        YAGL_SET_ERR(EGL_BAD_CURRENT_SURFACE);
-        goto out;
-    }
-
-    egl_api_ts->backend->wait_native(egl_api_ts->backend);
-
-    *retval = EGL_TRUE;
-
-out:
-    yagl_egl_surface_release(sfc);
-
-    return true;
-}
-
 bool yagl_host_eglSwapBuffers(EGLBoolean* retval,
     yagl_host_handle dpy_,
     yagl_host_handle surface_)
index 7f577936dde26eb222f3ee1c1eb2fad023afc902..de12ed0eb53c821a7e2d187a5bd50fdcd36a1836 100644 (file)
@@ -80,9 +80,6 @@ bool yagl_host_eglQueryContext(EGLBoolean* retval,
     yagl_host_handle ctx_,
     EGLint attribute,
     target_ulong /* EGLint* */ value_);
-bool yagl_host_eglWaitGL(EGLBoolean* retval);
-bool yagl_host_eglWaitNative(EGLBoolean* retval,
-    EGLint engine);
 bool yagl_host_eglSwapBuffers(EGLBoolean* retval,
     yagl_host_handle dpy_,
     yagl_host_handle surface_);
index 15116c21a36219b938d704ed40ad18706965d249..f436a54bdfc600fd44fbd4d8198e50f0388c2951 100644 (file)
@@ -87,17 +87,6 @@ static bool yagl_egl_offscreen_release_current(struct yagl_egl_backend *backend,
     return res || force;
 }
 
-static void yagl_egl_offscreen_wait_native(struct yagl_egl_backend *backend)
-{
-    struct yagl_egl_offscreen *egl_offscreen = (struct yagl_egl_offscreen*)backend;
-
-    YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_wait_native, NULL);
-
-    egl_offscreen->driver->wait_native(egl_offscreen->driver);
-
-    YAGL_LOG_FUNC_EXIT(NULL);
-}
-
 static void yagl_egl_offscreen_thread_fini(struct yagl_egl_backend *backend)
 {
     YAGL_LOG_FUNC_ENTER(yagl_egl_offscreen_thread_fini, NULL);
@@ -223,7 +212,6 @@ struct yagl_egl_backend *yagl_egl_offscreen_create(struct yagl_egl_driver *drive
     egl_offscreen->base.create_display = &yagl_egl_offscreen_create_display;
     egl_offscreen->base.make_current = &yagl_egl_offscreen_make_current;
     egl_offscreen->base.release_current = &yagl_egl_offscreen_release_current;
-    egl_offscreen->base.wait_native = &yagl_egl_offscreen_wait_native;
     egl_offscreen->base.thread_fini = &yagl_egl_offscreen_thread_fini;
     egl_offscreen->base.ensure_current = &yagl_egl_offscreen_ensure_current;
     egl_offscreen->base.unensure_current = &yagl_egl_offscreen_unensure_current;
index 8e15d9d3a79114bdd70c0c4afb80bc40bb2201a9..cab317e015fdbe1346afea9bf794865bfd5b0463 100644 (file)
@@ -146,17 +146,6 @@ static bool yagl_egl_onscreen_release_current(struct yagl_egl_backend *backend,
     return res || force;
 }
 
-static void yagl_egl_onscreen_wait_native(struct yagl_egl_backend *backend)
-{
-    struct yagl_egl_onscreen *egl_onscreen = (struct yagl_egl_onscreen*)backend;
-
-    YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_wait_native, NULL);
-
-    egl_onscreen->egl_driver->wait_native(egl_onscreen->egl_driver);
-
-    YAGL_LOG_FUNC_EXIT(NULL);
-}
-
 static void yagl_egl_onscreen_thread_fini(struct yagl_egl_backend *backend)
 {
     YAGL_LOG_FUNC_ENTER(yagl_egl_onscreen_thread_fini, NULL);
@@ -286,7 +275,6 @@ struct yagl_egl_backend *yagl_egl_onscreen_create(struct winsys_interface *wsi,
     egl_onscreen->base.create_display = &yagl_egl_onscreen_create_display;
     egl_onscreen->base.make_current = &yagl_egl_onscreen_make_current;
     egl_onscreen->base.release_current = &yagl_egl_onscreen_release_current;
-    egl_onscreen->base.wait_native = &yagl_egl_onscreen_wait_native;
     egl_onscreen->base.thread_fini = &yagl_egl_onscreen_thread_fini;
     egl_onscreen->base.ensure_current = &yagl_egl_onscreen_ensure_current;
     egl_onscreen->base.unensure_current = &yagl_egl_onscreen_unensure_current;
index caf7855ae559e4217e636defde84fe069d3d125a..0b7eb2c534b5cc2d90fe526d6cc008345794090e 100644 (file)
@@ -437,17 +437,6 @@ static bool yagl_egl_glx_make_current(struct yagl_egl_driver *driver,
     return ret;
 }
 
-static void yagl_egl_glx_wait_native(struct yagl_egl_driver *driver)
-{
-    struct yagl_egl_glx *egl_glx = (struct yagl_egl_glx*)driver;
-
-    YAGL_EGL_GLX_ENTER(yagl_egl_glx_wait_native, NULL);
-
-    egl_glx->glXWaitX();
-
-    YAGL_LOG_FUNC_EXIT(NULL);
-}
-
 /*
  * @}
  */
@@ -546,7 +535,6 @@ struct yagl_egl_driver *yagl_egl_driver_create(void *display)
     egl_glx->base.context_create = &yagl_egl_glx_context_create;
     egl_glx->base.context_destroy = &yagl_egl_glx_context_destroy;
     egl_glx->base.make_current = &yagl_egl_glx_make_current;
-    egl_glx->base.wait_native = &yagl_egl_glx_wait_native;
     egl_glx->base.destroy = &yagl_egl_glx_destroy;
 
     YAGL_LOG_FUNC_EXIT(NULL);
index ae16e3ef0d441834c4a8731631423d687e3ee062..8b4d03356365da4ae41271a84e675a4c0b89fb21 100644 (file)
@@ -685,13 +685,6 @@ static void yagl_egl_wgl_pbuffer_surface_destroy(struct yagl_egl_driver *driver,
     }
 }
 
-static void yagl_egl_wgl_wait_native(struct yagl_egl_driver *driver)
-{
-    YAGL_EGL_WGL_ENTER(yagl_egl_wgl_wait_native, NULL);
-
-    YAGL_LOG_FUNC_EXIT(NULL);
-}
-
 static void yagl_egl_wgl_destroy(struct yagl_egl_driver *driver)
 {
     YaglEglWglDriver *egl_wgl = (YaglEglWglDriver *)driver;
@@ -898,7 +891,6 @@ struct yagl_egl_driver *yagl_egl_driver_create(void *display)
     egl_driver->context_create = &yagl_egl_wgl_context_create;
     egl_driver->context_destroy = &yagl_egl_wgl_context_destroy;
     egl_driver->make_current = &yagl_egl_wgl_make_current;
-    egl_driver->wait_native = &yagl_egl_wgl_wait_native;
     egl_driver->destroy = &yagl_egl_wgl_destroy;
 
     if (!yagl_egl_wgl_init_ext(egl_wgl)) {
index 8c320fe3aeecdd5fb641e0f16f924155b52a3d6b..caf64ffaac684a9007e667bdd46b648d2d226c63 100644 (file)
@@ -29,8 +29,6 @@ struct yagl_egl_backend
     bool (*release_current)(struct yagl_egl_backend */*backend*/,
                             bool /*force*/);
 
-    void (*wait_native)(struct yagl_egl_backend */*backend*/);
-
     void (*thread_fini)(struct yagl_egl_backend */*backend*/);
 
     /*
index 743d3985d834e9be10a2dcefb554151412ce33e8..18ca0c4dd7fe8c81c69f810cdc5d2c655492befb 100644 (file)
@@ -72,8 +72,6 @@ struct yagl_egl_driver
                          EGLSurface /*read*/,
                          EGLContext /*ctx*/);
 
-    void (*wait_native)(struct yagl_egl_driver */*driver*/);
-
     void (*destroy)(struct yagl_egl_driver */*driver*/);
 
     struct yagl_dyn_lib *dyn_lib;