libgui: tidy up CpuConsumer
Remove unnecessary freeBufferLocked and destructor.
Test: libgui_test
Change-Id: Ifc81f72a2f9c0deca97294f6b2977bd150430f7c
diff --git a/libs/gui/CpuConsumer.cpp b/libs/gui/CpuConsumer.cpp
index 5bda5f8..baf6f7d 100644
--- a/libs/gui/CpuConsumer.cpp
+++ b/libs/gui/CpuConsumer.cpp
@@ -18,10 +18,11 @@
#define LOG_TAG "CpuConsumer"
//#define ATRACE_TAG ATRACE_TAG_GRAPHICS
-#include <utils/Log.h>
-#include <gui/BufferItem.h>
#include <gui/CpuConsumer.h>
+#include <gui/BufferItem.h>
+#include <utils/Log.h>
+
#define CC_LOGV(x, ...) ALOGV("[%s] " x, mName.string(), ##__VA_ARGS__)
//#define CC_LOGD(x, ...) ALOGD("[%s] " x, mName.string(), ##__VA_ARGS__)
//#define CC_LOGI(x, ...) ALOGI("[%s] " x, mName.string(), ##__VA_ARGS__)
@@ -43,12 +44,6 @@
mConsumer->setMaxAcquiredBufferCount(static_cast<int32_t>(maxLockedBuffers));
}
-CpuConsumer::~CpuConsumer() {
- // ConsumerBase destructor does all the work.
-}
-
-
-
void CpuConsumer::setName(const String8& name) {
Mutex::Autolock _l(mMutex);
if (mAbandoned) {
@@ -242,8 +237,4 @@
return OK;
}
-void CpuConsumer::freeBufferLocked(int slotIndex) {
- ConsumerBase::freeBufferLocked(slotIndex);
-}
-
} // namespace android
diff --git a/libs/gui/include/gui/CpuConsumer.h b/libs/gui/include/gui/CpuConsumer.h
index ea7c1ea..b50862f 100644
--- a/libs/gui/include/gui/CpuConsumer.h
+++ b/libs/gui/include/gui/CpuConsumer.h
@@ -94,8 +94,6 @@
CpuConsumer(const sp<IGraphicBufferConsumer>& bq,
size_t maxLockedBuffers, bool controlledByApp = false);
- virtual ~CpuConsumer();
-
// set the name of the CpuConsumer that will be used to identify it in
// log messages.
void setName(const String8& name);
@@ -121,8 +119,6 @@
// Maximum number of buffers that can be locked at a time
const size_t mMaxLockedBuffers;
- virtual void freeBufferLocked(int slotIndex);
-
// Tracking for buffers acquired by the user
struct AcquiredBuffer {
static constexpr uintptr_t kUnusedId = 0;
@@ -154,7 +150,6 @@
// Count of currently locked buffers
size_t mCurrentLockedBuffers;
-
};
} // namespace android