replicant-frameworks_native/libs/gui
Jamie Gennis d1b330de41 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
2012-09-21 12:15:22 -07:00
..
tests New test 2012-09-16 12:53:41 -07:00
Android.mk gui: conditionally set USE_NATIVE_FENCE_SYNC for msm8960 2012-09-18 19:36:12 -07:00
BitTube.cpp return errors properly in BitTube and SensorEventQueue 2012-05-07 18:22:16 -07:00
BufferItemConsumer.cpp libgui: move fence handling into ConsumerBase 2012-09-06 17:54:53 -07:00
BufferQueue.cpp Fix transform hints 2012-09-16 11:39:09 -07:00
CleanSpec.mk gui: conditionally set USE_NATIVE_FENCE_SYNC for msm8960 2012-09-18 19:36:12 -07:00
ConsumerBase.cpp libgui: move fence handling into ConsumerBase 2012-09-06 17:54:53 -07:00
CpuConsumer.cpp libgui: move fence handling into ConsumerBase 2012-09-06 17:54:53 -07:00
DisplayEventReceiver.cpp use a socketpair instead of a pipe in BitTube 2012-04-02 18:41:10 -07:00
DummyConsumer.cpp Refactored DummyConsumer 2012-03-27 16:47:12 -07:00
IDisplayEventConnection.cpp
IGraphicBufferAlloc.cpp libgui: add some error checks 2012-08-30 18:38:11 -07:00
ISensorEventConnection.cpp
ISensorServer.cpp improve [un]marshalling of non-binder objects 2012-08-13 02:46:05 -07:00
ISurface.cpp fix libgui header location 2012-02-27 13:03:08 -08:00
ISurfaceComposer.cpp Plumb display name into SurfaceFlinger 2012-09-18 09:20:23 -07:00
ISurfaceComposerClient.cpp Banish DisplayID from the SurfaceFlinger API. 2012-08-27 14:40:17 -07:00
ISurfaceTexture.cpp Pass fences with buffers from SurfaceTextureClient 2012-06-30 21:38:51 -07:00
LayerState.cpp improve [un]marshalling of non-binder objects 2012-08-13 02:46:05 -07:00
Sensor.cpp improve [un]marshalling of non-binder objects 2012-08-13 02:46:05 -07:00
SensorEventQueue.cpp return errors properly in BitTube and SensorEventQueue 2012-05-07 18:22:16 -07:00
SensorManager.cpp
Surface.cpp Remove unused "layer" argument from show(). 2012-08-27 14:40:17 -07:00
SurfaceComposerClient.cpp Plumb display name into SurfaceFlinger 2012-09-18 09:20:23 -07:00
SurfaceTexture.cpp SurfaceTexture: fix an out of bounds array write 2012-09-21 12:15:22 -07:00
SurfaceTextureClient.cpp resolved conflicts for merge of 21938749 to jb-mr1-dev 2012-08-20 10:22:33 -07:00