summaryrefslogtreecommitdiffstats
path: root/include/private/surfaceflinger/SharedBufferStack.h
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-10-06 17:07:39 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-10-06 17:07:39 -0700
commit499f518400d54f2f14753a674edd95c5bb11acfd (patch)
tree4a985755f7752b22cdea5d7cbaa4f5417d53da65 /include/private/surfaceflinger/SharedBufferStack.h
parent7930b5bc068e92a1eaaa6c890b77aebbdf01e259 (diff)
parentff04e97faf75c435e453d4c1caf7eeac8b9c1ceb (diff)
downloadframeworks_base-499f518400d54f2f14753a674edd95c5bb11acfd.zip
frameworks_base-499f518400d54f2f14753a674edd95c5bb11acfd.tar.gz
frameworks_base-499f518400d54f2f14753a674edd95c5bb11acfd.tar.bz2
am ff04e97f: am f4619308: Merge "fix [2835280] Add support for cancelling buffers to ANativeWindow" into gingerbread
Merge commit 'ff04e97faf75c435e453d4c1caf7eeac8b9c1ceb' * commit 'ff04e97faf75c435e453d4c1caf7eeac8b9c1ceb': fix [2835280] Add support for cancelling buffers to ANativeWindow
Diffstat (limited to 'include/private/surfaceflinger/SharedBufferStack.h')
-rw-r--r--include/private/surfaceflinger/SharedBufferStack.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/private/surfaceflinger/SharedBufferStack.h b/include/private/surfaceflinger/SharedBufferStack.h
index d689667..d6ae5e9 100644
--- a/include/private/surfaceflinger/SharedBufferStack.h
+++ b/include/private/surfaceflinger/SharedBufferStack.h
@@ -114,8 +114,9 @@ public:
int32_t identity; // surface's identity (const)
int32_t token; // surface's token (for debugging)
- int32_t reserved32[1];
Statistics stats;
+ int8_t headBuf; // last retired buffer
+ uint8_t reservedBytes[3];
int32_t reserved;
BufferData buffers[NUM_BUFFER_MAX]; // 1024 bytes
};
@@ -201,6 +202,7 @@ public:
status_t undoDequeue(int buf);
status_t lock(int buf);
+ status_t cancel(int buf);
status_t queue(int buf);
bool needNewBuffer(int buffer) const;
status_t setDirtyRegion(int buffer, const Region& reg);
@@ -230,8 +232,9 @@ private:
inline ssize_t operator()();
};
- struct UndoDequeueUpdate : public UpdateBase {
- inline UndoDequeueUpdate(SharedBufferBase* sbb);
+ struct CancelUpdate : public UpdateBase {
+ int tail, buf;
+ inline CancelUpdate(SharedBufferBase* sbb, int tail, int buf);
inline ssize_t operator()();
};
@@ -256,7 +259,6 @@ private:
int mNumBuffers;
int32_t tail;
- int32_t undoDequeueTail;
int32_t queued_head;
// statistics...
nsecs_t mDequeueTime[SharedBufferStack::NUM_BUFFER_MAX];