diff options
author | Jesse Hall <jessehall@google.com> | 2012-06-29 15:21:18 -0700 |
---|---|---|
committer | Jesse Hall <jessehall@google.com> | 2012-06-30 21:38:51 -0700 |
commit | dc5b485f74edf2d2f31c62054eb6c180421a3ade (patch) | |
tree | f33c9322cadc2895f0e0f28c1968d796c423c8c6 /include/gui | |
parent | b42b1ac1587aebda5e2f334d95b620271fafba4e (diff) | |
download | frameworks_native-dc5b485f74edf2d2f31c62054eb6c180421a3ade.zip frameworks_native-dc5b485f74edf2d2f31c62054eb6c180421a3ade.tar.gz frameworks_native-dc5b485f74edf2d2f31c62054eb6c180421a3ade.tar.bz2 |
Pass fence to HWC on first use of buffer
Also do a CPU-wait on the fence before using it for GL composition.
Change-Id: I0f645a42a44803276cae11b904e5a26d65871562
Diffstat (limited to 'include/gui')
-rw-r--r-- | include/gui/SurfaceTexture.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/gui/SurfaceTexture.h b/include/gui/SurfaceTexture.h index 622724e..66c390a 100644 --- a/include/gui/SurfaceTexture.h +++ b/include/gui/SurfaceTexture.h @@ -172,6 +172,10 @@ public: // getCurrentScalingMode returns the scaling mode of the current buffer. uint32_t getCurrentScalingMode() const; + // getCurrentFence returns the fence indicating when the current buffer is + // ready to be read from. + sp<Fence> getCurrentFence() const; + // isSynchronousMode returns whether the SurfaceTexture is currently in // synchronous mode. bool isSynchronousMode() const; @@ -303,6 +307,9 @@ private: // set to each time updateTexImage is called. uint32_t mCurrentScalingMode; + // mCurrentFence is the fence received from BufferQueue in updateTexImage. + sp<Fence> mCurrentFence; + // mCurrentTransformMatrix is the transform matrix for the current texture. // It gets computed by computeTransformMatrix each time updateTexImage is // called. |