diff options
author | Mathias Agopian <mathias@google.com> | 2010-09-15 12:29:18 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2010-09-15 12:29:18 -0700 |
commit | a5ab8ce602ecfd897805e185c89a6eff0c78aabe (patch) | |
tree | e393ed7e14ae9a42faaf542ccdeda36f6cacf7fa /libs/surfaceflinger_client | |
parent | 19c5df745229374748f38c76a222ec8ce1d08e81 (diff) | |
parent | 48a862407dda482450bdfd5aa2a2cd8b3e8e38dd (diff) | |
download | frameworks_base-a5ab8ce602ecfd897805e185c89a6eff0c78aabe.zip frameworks_base-a5ab8ce602ecfd897805e185c89a6eff0c78aabe.tar.gz frameworks_base-a5ab8ce602ecfd897805e185c89a6eff0c78aabe.tar.bz2 |
resolved conflicts for merge of 48a86240 to master
Change-Id: I2305fef9f4dd46183337217d822df3c675b6b6e5
Diffstat (limited to 'libs/surfaceflinger_client')
-rw-r--r-- | libs/surfaceflinger_client/Surface.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/libs/surfaceflinger_client/Surface.cpp b/libs/surfaceflinger_client/Surface.cpp index 2bc5fad..c77d48e 100644 --- a/libs/surfaceflinger_client/Surface.cpp +++ b/libs/surfaceflinger_client/Surface.cpp @@ -32,6 +32,7 @@ #include <ui/DisplayInfo.h> #include <ui/GraphicBuffer.h> #include <ui/GraphicBufferMapper.h> +#include <ui/GraphicLog.h> #include <ui/Rect.h> #include <surfaceflinger/Surface.h> @@ -578,7 +579,13 @@ int Surface::dequeueBuffer(android_native_buffer_t** buffer) if (err != NO_ERROR) return err; + GraphicLog& logger(GraphicLog::getInstance()); + logger.log(GraphicLog::SF_APP_DEQUEUE_BEFORE, mIdentity, -1); + ssize_t bufIdx = mSharedBufferClient->dequeue(); + + logger.log(GraphicLog::SF_APP_DEQUEUE_AFTER, mIdentity, bufIdx); + if (bufIdx < 0) { LOGE("error dequeuing a buffer (%s)", strerror(bufIdx)); return bufIdx; @@ -627,13 +634,20 @@ int Surface::lockBuffer(android_native_buffer_t* buffer) return err; int32_t bufIdx = getBufferIndex(GraphicBuffer::getSelf(buffer)); + + GraphicLog& logger(GraphicLog::getInstance()); + logger.log(GraphicLog::SF_APP_LOCK_BEFORE, mIdentity, bufIdx); + err = mSharedBufferClient->lock(bufIdx); + + logger.log(GraphicLog::SF_APP_LOCK_AFTER, mIdentity, bufIdx); + LOGE_IF(err, "error locking buffer %d (%s)", bufIdx, strerror(-err)); return err; } int Surface::queueBuffer(android_native_buffer_t* buffer) -{ +{ status_t err = validate(); if (err != NO_ERROR) return err; @@ -643,6 +657,9 @@ int Surface::queueBuffer(android_native_buffer_t* buffer) } int32_t bufIdx = getBufferIndex(GraphicBuffer::getSelf(buffer)); + + GraphicLog::getInstance().log(GraphicLog::SF_APP_QUEUE, mIdentity, bufIdx); + mSharedBufferClient->setTransform(bufIdx, mNextBufferTransform); mSharedBufferClient->setCrop(bufIdx, mNextBufferCrop); mSharedBufferClient->setDirtyRegion(bufIdx, mDirtyRegion); |