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/RenderEngine | |
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/RenderEngine')
-rw-r--r-- | services/surfaceflinger/RenderEngine/RenderEngine.cpp | 4 | ||||
-rw-r--r-- | services/surfaceflinger/RenderEngine/RenderEngine.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/services/surfaceflinger/RenderEngine/RenderEngine.cpp b/services/surfaceflinger/RenderEngine/RenderEngine.cpp index d5d5da8..a77e0e9 100644 --- a/services/surfaceflinger/RenderEngine/RenderEngine.cpp +++ b/services/surfaceflinger/RenderEngine/RenderEngine.cpp @@ -219,6 +219,10 @@ void RenderEngine::fillRegionWithColor(const Region& region, uint32_t height, drawMesh(mesh); } +void RenderEngine::flush() { + glFlush(); +} + void RenderEngine::clearWithColor(float red, float green, float blue, float alpha) { glClearColor(red, green, blue, alpha); glClear(GL_COLOR_BUFFER_BIT); diff --git a/services/surfaceflinger/RenderEngine/RenderEngine.h b/services/surfaceflinger/RenderEngine/RenderEngine.h index acbff9b..8d7529c 100644 --- a/services/surfaceflinger/RenderEngine/RenderEngine.h +++ b/services/surfaceflinger/RenderEngine/RenderEngine.h @@ -67,6 +67,7 @@ public: virtual void dump(String8& result); // helpers + void flush(); void clearWithColor(float red, float green, float blue, float alpha); void fillRegionWithColor(const Region& region, uint32_t height, float red, float green, float blue, float alpha); |