summaryrefslogtreecommitdiffstats
path: root/libs/gui
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2013-09-19 14:59:51 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-09-19 14:59:51 -0700
commit1160e89d31810f2ba66f8ab502281579115b39b0 (patch)
tree9d181197d84a2bdba929d935a3b040e924fc952d /libs/gui
parenta7e1660b257326f99261e7c9b2d58c9d2e68d0b0 (diff)
parentd171da973de3c6b30263011334fdcd916739144f (diff)
downloadframeworks_native-1160e89d31810f2ba66f8ab502281579115b39b0.zip
frameworks_native-1160e89d31810f2ba66f8ab502281579115b39b0.tar.gz
frameworks_native-1160e89d31810f2ba66f8ab502281579115b39b0.tar.bz2
am d171da97: GLConsumer: Add query for current frame number.
* commit 'd171da973de3c6b30263011334fdcd916739144f': GLConsumer: Add query for current frame number.
Diffstat (limited to 'libs/gui')
-rw-r--r--libs/gui/GLConsumer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/gui/GLConsumer.cpp b/libs/gui/GLConsumer.cpp
index 0a2afbf..cf3f12a 100644
--- a/libs/gui/GLConsumer.cpp
+++ b/libs/gui/GLConsumer.cpp
@@ -96,6 +96,7 @@ GLConsumer::GLConsumer(const sp<IGraphicBufferConsumer>& bq, uint32_t tex,
mCurrentScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
mCurrentFence(Fence::NO_FENCE),
mCurrentTimestamp(0),
+ mCurrentFrameNumber(0),
mDefaultWidth(1),
mDefaultHeight(1),
mFilteringEnabled(true),
@@ -380,6 +381,7 @@ status_t GLConsumer::updateAndReleaseLocked(const BufferQueue::BufferItem& item)
mCurrentScalingMode = item.mScalingMode;
mCurrentTimestamp = item.mTimestamp;
mCurrentFence = item.mFence;
+ mCurrentFrameNumber = item.mFrameNumber;
computeCurrentTransformMatrixLocked();
@@ -819,6 +821,12 @@ nsecs_t GLConsumer::getTimestamp() {
return mCurrentTimestamp;
}
+nsecs_t GLConsumer::getFrameNumber() {
+ ST_LOGV("getFrameNumber");
+ Mutex::Autolock lock(mMutex);
+ return mCurrentFrameNumber;
+}
+
EGLImageKHR GLConsumer::createImage(EGLDisplay dpy,
const sp<GraphicBuffer>& graphicBuffer) {
EGLClientBuffer cbuf = (EGLClientBuffer)graphicBuffer->getNativeBuffer();