summaryrefslogtreecommitdiffstats
path: root/include/private
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-07-27 20:11:35 -0700
committerMathias Agopian <mathias@google.com>2010-07-27 20:11:35 -0700
commit208cb0772429b9ac800010829ecc7b854bdc2d24 (patch)
treead100015679a6232c23969466c02d90e085049a6 /include/private
parent5767cf62a45d64980a4bf91bdd2e8357f79e1a4e (diff)
downloadframeworks_native-208cb0772429b9ac800010829ecc7b854bdc2d24.zip
frameworks_native-208cb0772429b9ac800010829ecc7b854bdc2d24.tar.gz
frameworks_native-208cb0772429b9ac800010829ecc7b854bdc2d24.tar.bz2
fix [2873058] Surface::dequeueBuffer blocks on last buffer, i.e. cannot dequeue all allocated buffers at once.
this situation happened when the last buffer needed to be resized (or allocated, the first time). the assumption was that the buffer was in use by SF itself as the current buffer (obviously, this assumption made no sense when the buffer had never been allocated, btw). the system would wait until some other buffer became the "front" buffer. we fix this problem by entirely removing the requirement that the buffer being resized cannot be the front buffer. instead, we just allocate a new buffer and replace the front buffer by the new one. the downside is that this uses more memory (an extra buffer) for a brief amount of time while the old buffer is being reallocated and before it has actually been replaced. Change-Id: I022e4621209474ceb1c671b23deb4188eaaa7285
Diffstat (limited to 'include/private')
-rw-r--r--include/private/surfaceflinger/SharedBufferStack.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/private/surfaceflinger/SharedBufferStack.h b/include/private/surfaceflinger/SharedBufferStack.h
index 633b543..1eb178e 100644
--- a/include/private/surfaceflinger/SharedBufferStack.h
+++ b/include/private/surfaceflinger/SharedBufferStack.h
@@ -273,7 +273,6 @@ public:
void setStatus(status_t status);
status_t reallocateAll();
status_t reallocateAllExcept(int buffer);
- status_t assertReallocate(int buffer);
int32_t getQueuedCount() const;
Region getDirtyRegion(int buffer) const;
@@ -356,13 +355,6 @@ private:
inline StatusUpdate(SharedBufferBase* sbb, status_t status);
inline ssize_t operator()();
};
-
- struct ReallocateCondition : public ConditionBase {
- int buf;
- inline ReallocateCondition(SharedBufferBase* sbb, int buf);
- inline bool operator()() const;
- inline const char* name() const { return "ReallocateCondition"; }
- };
};
// ===========================================================================