diff options
author | Jamie Gennis <jgennis@google.com> | 2012-03-19 18:33:05 -0700 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2012-03-19 18:33:05 -0700 |
commit | ce561372186c7549a8a5fe996ac5965cda087007 (patch) | |
tree | 45f594137888015d8d3ffea586da786e3be13bc7 /include/gui | |
parent | fa5b40ebb8923133df12dc70591bfe35b3f1c9b3 (diff) | |
download | frameworks_native-ce561372186c7549a8a5fe996ac5965cda087007.zip frameworks_native-ce561372186c7549a8a5fe996ac5965cda087007.tar.gz frameworks_native-ce561372186c7549a8a5fe996ac5965cda087007.tar.bz2 |
libgui: have ST::updateTexImage check the GL ctx
This change adds a check to SurfaceTexture::updateTexImage to verify
that the current GL context is the same as the one that was used for
previous updateTexImage calls.
Change-Id: If02d2f787bcfdb528046dc9ddf6665f8a90e1bf4
Diffstat (limited to 'include/gui')
-rw-r--r-- | include/gui/SurfaceTexture.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h index f8dc3ac..cd490f2 100644 --- a/include/gui/SurfaceTexture.h +++ b/include/gui/SurfaceTexture.h @@ -260,7 +260,6 @@ private: struct EGLSlot { EGLSlot() : mEglImage(EGL_NO_IMAGE_KHR), - mEglDisplay(EGL_NO_DISPLAY), mFence(EGL_NO_SYNC_KHR) { } @@ -269,9 +268,6 @@ private: // mEglImage is the EGLImage created from mGraphicBuffer. EGLImageKHR mEglImage; - // mEglDisplay is the EGLDisplay used to create mEglImage. - EGLDisplay mEglDisplay; - // mFence is the EGL sync object that must signal before the buffer // associated with this buffer slot may be dequeued. It is initialized // to EGL_NO_SYNC_KHR when the buffer is created and (optionally, based @@ -279,6 +275,17 @@ private: EGLSyncKHR mFence; }; + // mEglDisplay is the EGLDisplay with which this SurfaceTexture is currently + // associated. It is intialized to EGL_NO_DISPLAY and gets set to the + // current display when updateTexImage is called for the first time. + EGLDisplay mEglDisplay; + + // mEglContext is the OpenGL ES context with which this SurfaceTexture is + // currently associated. It is initialized to EGL_NO_CONTEXT and gets set + // to the current GL context when updateTexImage is called for the first + // time. + EGLContext mEglContext; + // mEGLSlots stores the buffers that have been allocated by the BufferQueue // for each buffer slot. It is initialized to null pointers, and gets // filled in with the result of BufferQueue::acquire when the |