diff options
| -rw-r--r-- | recipes-graphics/userland/userland/0013-Fix-for-framerate-with-nested-composition.patch | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/recipes-graphics/userland/userland/0013-Fix-for-framerate-with-nested-composition.patch b/recipes-graphics/userland/userland/0013-Fix-for-framerate-with-nested-composition.patch index 6377e31..2fa9d66 100644 --- a/recipes-graphics/userland/userland/0013-Fix-for-framerate-with-nested-composition.patch +++ b/recipes-graphics/userland/userland/0013-Fix-for-framerate-with-nested-composition.patch | |||
| @@ -1,20 +1,39 @@ | |||
| 1 | From 7f424ce48f6c14118aea2ab770b3bbf87e1f0393 Mon Sep 17 00:00:00 2001 | 1 | From e5affc4ff145eedf61e2625a8919622c92d0b8ba Mon Sep 17 00:00:00 2001 |
| 2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
| 3 | Date: Thu, 24 Mar 2016 14:30:58 -0700 | 3 | Date: Tue, 29 Mar 2016 20:38:30 -0700 |
| 4 | Subject: [PATCH 13/13] Fix for framerate with nested composition | 4 | Subject: [PATCH 13/14] Fix for framerate with nested composition |
| 5 | 5 | ||
| 6 | frame rate appears irregular and lower than expected when using nested composition. | 6 | frame rate appears irregular and lower than expected when using nested composition. |
| 7 | 7 | ||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 9 | --- | 9 | --- |
| 10 | interface/khronos/egl/egl_client.c | 1 + | 10 | interface/khronos/egl/egl_client.c | 9 ++++++++- |
| 11 | 1 file changed, 1 insertion(+) | 11 | 1 file changed, 8 insertions(+), 1 deletion(-) |
| 12 | 12 | ||
| 13 | diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c | 13 | diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c |
| 14 | index 024f3ed..95bb581 100644 | 14 | index 024f3ed..d8a007c 100644 |
| 15 | --- a/interface/khronos/egl/egl_client.c | 15 | --- a/interface/khronos/egl/egl_client.c |
| 16 | +++ b/interface/khronos/egl/egl_client.c | 16 | +++ b/interface/khronos/egl/egl_client.c |
| 17 | @@ -2360,6 +2360,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) | 17 | @@ -2342,6 +2342,9 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) |
| 18 | surface->back_wl_buffer = buffer; | ||
| 19 | } | ||
| 20 | |||
| 21 | + glFlush(); | ||
| 22 | + glFinish(); | ||
| 23 | + | ||
| 24 | RPC_CALL7(eglIntSwapBuffers_impl, | ||
| 25 | thread, | ||
| 26 | EGLINTSWAPBUFFERS_ID_V2, | ||
| 27 | @@ -2353,6 +2356,8 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) | ||
| 28 | RPC_UINT(khrn_platform_get_window_position(surface->win)), | ||
| 29 | RPC_INT(surface->back_wl_buffer->resource)); | ||
| 30 | |||
| 31 | + RPC_FLUSH(thread); | ||
| 32 | + | ||
| 33 | surface->front_wl_buffer->in_use = 1; | ||
| 34 | wl_surface_attach(wl_egl_window->wl_surface, | ||
| 35 | surface->front_wl_buffer->wl_buffer, | ||
| 36 | @@ -2360,10 +2365,11 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) | ||
| 18 | wl_surface_damage(wl_egl_window->wl_surface, 0, 0, | 37 | wl_surface_damage(wl_egl_window->wl_surface, 0, 0, |
| 19 | surface->width, surface->height); | 38 | surface->width, surface->height); |
| 20 | wl_surface_commit(wl_egl_window->wl_surface); | 39 | wl_surface_commit(wl_egl_window->wl_surface); |
| @@ -22,6 +41,19 @@ index 024f3ed..95bb581 100644 | |||
| 22 | 41 | ||
| 23 | while(ret != -1 && surface->back_wl_buffer->in_use) | 42 | while(ret != -1 && surface->back_wl_buffer->in_use) |
| 24 | ret = wl_display_dispatch_queue(wl_display, process->wl_queue); | 43 | ret = wl_display_dispatch_queue(wl_display, process->wl_queue); |
| 44 | - } else | ||
| 45 | + } else { | ||
| 46 | #endif | ||
| 47 | RPC_CALL6(eglIntSwapBuffers_impl, | ||
| 48 | thread, | ||
| 49 | @@ -2376,6 +2382,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) | ||
| 50 | RPC_UINT(khrn_platform_get_window_position(surface->win))); | ||
| 51 | |||
| 52 | RPC_FLUSH(thread); | ||
| 53 | + } | ||
| 54 | |||
| 55 | #ifdef ANDROID | ||
| 56 | CLIENT_UNLOCK(); | ||
| 25 | -- | 57 | -- |
| 26 | 2.7.4 | 58 | 2.7.4 |
| 27 | 59 | ||
