diff options
author | Paulo Sergio Travaglia <[email protected]> | 2014-05-02 12:00:11 -0300 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2014-05-05 08:33:14 +0800 |
commit | 97a70f26f257158aad7fb426e78d9001e7121844 (patch) | |
tree | e60c6a0bfaec437daa3d2a7752e9e5aa9aa91397 /src/gallium/state_trackers/egl/android | |
parent | 5cfd45fbc3daf2e33ae9c6dfeb8399658bf0abe7 (diff) |
st/egl: Flush resources before presentation (android - bug 77966)
[olv: Use the real name provided by the patch author. Ideally this could be
moved to somewhere higher level so that we would not need to create a pipe
context to flush resources. Plus, it is not clear if flushing resources for
another context is valid.]
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/egl/android')
-rw-r--r-- | src/gallium/state_trackers/egl/android/native_android.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/egl/android/native_android.cpp b/src/gallium/state_trackers/egl/android/native_android.cpp index e73d031f561..8620ed86578 100644 --- a/src/gallium/state_trackers/egl/android/native_android.cpp +++ b/src/gallium/state_trackers/egl/android/native_android.cpp @@ -396,6 +396,13 @@ android_surface_swap_buffers(struct native_surface *nsurf) struct android_surface *asurf = android_surface(nsurf); struct android_display *adpy = asurf->adpy; + struct native_display *ndpy = &adpy->base; + struct pipe_context *pipe = ndpy_get_copy_context(ndpy); + + /* flush buffer */ + pipe->flush_resource(pipe, asurf->buf_res); + pipe->flush(pipe, NULL, 0); + android_surface_enqueue_buffer(&asurf->base); asurf->stamp++; |