diff options
Diffstat (limited to 'recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch')
-rw-r--r-- | recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch b/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch new file mode 100644 index 0000000..a6c9a59 --- /dev/null +++ b/recipes-graphics/userland/files/0010-Fix-for-framerate-with-nested-composition.patch | |||
@@ -0,0 +1,60 @@ | |||
1 | From 7c51c2d37bfadaabbbf205237d932b685b09d34f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 29 Mar 2016 20:38:30 -0700 | ||
4 | Subject: [PATCH 10/16] Fix for framerate with nested composition | ||
5 | |||
6 | frame rate appears irregular and lower than expected when using nested composition. | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | interface/khronos/egl/egl_client.c | 8 ++++++++ | ||
11 | 1 file changed, 8 insertions(+) | ||
12 | |||
13 | diff --git a/interface/khronos/egl/egl_client.c b/interface/khronos/egl/egl_client.c | ||
14 | index 03fe67b..13a110c 100644 | ||
15 | --- a/interface/khronos/egl/egl_client.c | ||
16 | +++ b/interface/khronos/egl/egl_client.c | ||
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,11 +2365,13 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) | ||
37 | wl_surface_damage(wl_egl_window->wl_surface, 0, 0, | ||
38 | surface->width, surface->height); | ||
39 | wl_surface_commit(wl_egl_window->wl_surface); | ||
40 | + wl_display_flush(wl_display); | ||
41 | |||
42 | while(ret != -1 && surface->back_wl_buffer->in_use) | ||
43 | ret = wl_display_dispatch_queue(wl_display, process->wl_queue); | ||
44 | } else | ||
45 | #endif | ||
46 | + { | ||
47 | RPC_CALL6(eglIntSwapBuffers_impl, | ||
48 | thread, | ||
49 | EGLINTSWAPBUFFERS_ID, | ||
50 | @@ -2376,6 +2383,7 @@ EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surf) | ||
51 | RPC_UINT(khrn_platform_get_window_position(surface->win))); | ||
52 | |||
53 | RPC_FLUSH(thread); | ||
54 | + } | ||
55 | |||
56 | #ifdef ANDROID | ||
57 | CLIENT_UNLOCK(); | ||
58 | -- | ||
59 | 2.16.1 | ||
60 | |||