Merge "Add glFlush in surfaceflinger screenshot code." into lmp-mr1-dev
This commit is contained in:
commit
131866e1a4
@ -219,6 +219,10 @@ void RenderEngine::fillRegionWithColor(const Region& region, uint32_t height,
|
|||||||
drawMesh(mesh);
|
drawMesh(mesh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RenderEngine::flush() {
|
||||||
|
glFlush();
|
||||||
|
}
|
||||||
|
|
||||||
void RenderEngine::clearWithColor(float red, float green, float blue, float alpha) {
|
void RenderEngine::clearWithColor(float red, float green, float blue, float alpha) {
|
||||||
glClearColor(red, green, blue, alpha);
|
glClearColor(red, green, blue, alpha);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
@ -67,6 +67,7 @@ public:
|
|||||||
virtual void dump(String8& result);
|
virtual void dump(String8& result);
|
||||||
|
|
||||||
// helpers
|
// helpers
|
||||||
|
void flush();
|
||||||
void clearWithColor(float red, float green, float blue, float alpha);
|
void clearWithColor(float red, float green, float blue, float alpha);
|
||||||
void fillRegionWithColor(const Region& region, uint32_t height,
|
void fillRegionWithColor(const Region& region, uint32_t height,
|
||||||
float red, float green, float blue, float alpha);
|
float red, float green, float blue, float alpha);
|
||||||
|
@ -3201,6 +3201,8 @@ status_t SurfaceFlinger::captureScreenImplLocked(
|
|||||||
EGLSyncKHR sync;
|
EGLSyncKHR sync;
|
||||||
if (!DEBUG_SCREENSHOTS) {
|
if (!DEBUG_SCREENSHOTS) {
|
||||||
sync = eglCreateSyncKHR(mEGLDisplay, EGL_SYNC_NATIVE_FENCE_ANDROID, NULL);
|
sync = eglCreateSyncKHR(mEGLDisplay, EGL_SYNC_NATIVE_FENCE_ANDROID, NULL);
|
||||||
|
// native fence fd will not be populated until flush() is done.
|
||||||
|
getRenderEngine().flush();
|
||||||
} else {
|
} else {
|
||||||
sync = EGL_NO_SYNC_KHR;
|
sync = EGL_NO_SYNC_KHR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user