diff options
author | Jamie Gennis <jgennis@google.com> | 2012-09-17 16:58:17 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-18 10:59:40 -0700 |
commit | 3941cb240d438bfdebe24920bb2ada86456a0bf9 (patch) | |
tree | 199bc20b70e5be24a8cc987b4bdaec813a01f7b3 /include/gui | |
parent | 8dfa92fef9759a881e96ee58d59875d35023aab9 (diff) | |
download | frameworks_native-3941cb240d438bfdebe24920bb2ada86456a0bf9.zip frameworks_native-3941cb240d438bfdebe24920bb2ada86456a0bf9.tar.gz frameworks_native-3941cb240d438bfdebe24920bb2ada86456a0bf9.tar.bz2 |
SurfaceTexture: default to doing GL sync
This change makes updateTexImage default to performing the necessary
synchronization and adds an argument for SurfaceFlinger to disable that
synchronization so that it can be performed lazily.
Change-Id: I7c20923cc786634126fbf7021c9d2541aa77be5d
Bug: 6991805
Diffstat (limited to 'include/gui')
-rw-r--r-- | include/gui/SurfaceTexture.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h index 6e5a478..37e7eb1 100644 --- a/include/gui/SurfaceTexture.h +++ b/include/gui/SurfaceTexture.h @@ -246,7 +246,7 @@ private: virtual ~BufferRejecter() { } }; friend class Layer; - status_t updateTexImage(BufferRejecter* rejecter); + status_t updateTexImage(BufferRejecter* rejecter, bool skipSync); // createImage creates a new EGLImage from a GraphicBuffer. EGLImageKHR createImage(EGLDisplay dpy, @@ -264,6 +264,13 @@ private: // to compute this matrix and stores it in mCurrentTransformMatrix. void computeCurrentTransformMatrix(); + // doGLFenceWaitLocked inserts a wait command into the OpenGL ES command + // stream to ensure that it is safe for future OpenGL ES commands to + // access the current texture buffer. This must be called each time + // updateTexImage is called before issuing OpenGL ES commands that access + // the texture. + status_t doGLFenceWaitLocked() const; + // syncForReleaseLocked performs the synchronization needed to release the // current slot from an OpenGL ES context. If needed it will set the // current slot's fence to guard against a producer accessing the buffer |