SurfaceTexture: inherit from ConsumerBase (try 2)
This change makes SurfaceTexture inherit from ConsumerBase. It removes all of
the functionality from SurfaceTexture that is now provided by the base class.
This includes fixes for two bugs that were found after checking this change in
the first time and then reverting it.
Change-Id: Ie2d9f4f27cfef26fdac341de3152e842b01a58d2
diff --git a/libs/gui/ConsumerBase.cpp b/libs/gui/ConsumerBase.cpp
index af19ac0..17bbfd1 100644
--- a/libs/gui/ConsumerBase.cpp
+++ b/libs/gui/ConsumerBase.cpp
@@ -53,7 +53,8 @@
}
ConsumerBase::ConsumerBase(const sp<BufferQueue>& bufferQueue) :
- mBufferQueue(bufferQueue) {
+ mAbandoned(false),
+ mBufferQueue(bufferQueue) {
// Choose a name using the PID and a process-unique ID.
mName = String8::format("unnamed-%d-%d", getpid(), createProcessUniqueId());