summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/EventThread.cpp
diff options
context:
space:
mode:
author Jamie Gennis <jgennis@google.com> 2012-09-21 11:55:35 -0700
committer Jamie Gennis <jgennis@google.com> 2012-09-21 12:15:22 -0700
commitd1b330de416adff0d178a5cb7271419d9ed7a89a (patch)
treec2751efdda3af8c62a5244f3c038e47641550e66 /services/surfaceflinger/EventThread.cpp
parentaaf421c465794c02f86ee2929f330a8b7206199b (diff)
SurfaceTexture: fix an out of bounds array write
This change fixes an issue causing the mEglContext member of a SurfaceTexture to get incorrectly zeroed out. This would happen when a call to ConsumerBase::releaseBufferLocked resulted in the current buffer being freed. Freeing the current buffer would set SurfaceTexture::mCurrentTexture to -1, which would then be used by SurfaceTexture::releaseBufferLocked to reset the current slot's EGLSyncKHR to EGL_NO_SYNC_KHR (= 0). This would overwrite the mEglContext field, resulting in context mismatch errors in SurfaceTexture::doGLFenceWaitLocked. The fix is to simply use the buffer slot that's passed in to SurfaceTexture::releaseBufferLocked rather than mCurrentTexture. Change-Id: I0e5e2bd88fcbb354c35a3744f317716fff3e0e41
Diffstat (limited to 'services/surfaceflinger/EventThread.cpp')
0 files changed, 0 insertions, 0 deletions