diff options
author | Riley Andrews <riandrews@google.com> | 2014-10-23 16:17:04 -0700 |
---|---|---|
committer | Riley Andrews <riandrews@google.com> | 2014-10-23 16:25:17 -0700 |
commit | 9707f4df640c3369f873a934bb05ffa5a68a5640 (patch) | |
tree | 38b73a65d216c659f1f3913b6481355cab6e1b34 /services/surfaceflinger/SurfaceFlinger.cpp | |
parent | afe2b1fadd29149ceed639357e44e06e97c3a5ca (diff) | |
download | frameworks_native-9707f4df640c3369f873a934bb05ffa5a68a5640.zip frameworks_native-9707f4df640c3369f873a934bb05ffa5a68a5640.tar.gz frameworks_native-9707f4df640c3369f873a934bb05ffa5a68a5640.tar.bz2 |
Add glFlush in surfaceflinger screenshot code.
After creating a syncKHR object with type EGL_SYNC_NATIVE_FENCE_ANDROID,
glFlush must be called before the EGL_SYNC_NATIVE_FENCE_FD_ANDROID attribute
is populated with a sync fd. We currently call eglDupNativeFenceFDANDROID
before issuing the flush.
Bug 18052459
Taken verbatim from matthew.k.gumbel@intel.com.
Change-Id: I3781d14f92862076e2bca7d27341a6dc6e7e3775
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 96a8adb..50968e7 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -3201,6 +3201,8 @@ status_t SurfaceFlinger::captureScreenImplLocked( EGLSyncKHR sync; if (!DEBUG_SCREENSHOTS) { sync = eglCreateSyncKHR(mEGLDisplay, EGL_SYNC_NATIVE_FENCE_ANDROID, NULL); + // native fence fd will not be populated until flush() is done. + getRenderEngine().flush(); } else { sync = EGL_NO_SYNC_KHR; } |