Skip to content

Commit 9c0a86b

Browse files
committed
Remove obsolete BLASTBufferQueue constructor
This constructor may apply a transaction using the default apply token. Calling update after construction allows the caller to specify the token. Remove the constructor since its redundant and maybe error prone in cases where the caller needs to specify a token. Bug: 386289111 Test: presubmit Flag: EXEMPT refactor Change-Id: Id4f196b029a5c07e2b3c299d14b81f9c548d6d6b
1 parent 06e3c3f commit 9c0a86b

4 files changed

Lines changed: 5 additions & 10 deletions

File tree

libs/gui/BLASTBufferQueue.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,6 @@ BLASTBufferQueue::BLASTBufferQueue(const std::string& name, bool updateDestinati
244244
BQA_LOGV("BLASTBufferQueue created");
245245
}
246246

247-
BLASTBufferQueue::BLASTBufferQueue(const std::string& name, const sp<SurfaceControl>& surface,
248-
int width, int height, int32_t format)
249-
: BLASTBufferQueue(name) {
250-
update(surface, width, height, format);
251-
}
252-
253247
BLASTBufferQueue::~BLASTBufferQueue() {
254248
TransactionCompletedListener::getInstance()->removeQueueStallListener(this);
255249
if (mPendingTransactions.empty()) {

libs/gui/SurfaceControl.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ sp<Surface> SurfaceControl::generateSurfaceLocked()
141141
ISurfaceComposerClient::eOpaque);
142142
mBbqChild = mClient->createSurface(String8::format("[BBQ] %s", mName.c_str()), 0, 0, mFormat,
143143
flags, mHandle, {}, &ignore);
144-
mBbq = sp<BLASTBufferQueue>::make("[BBQ]" + mName, mBbqChild, mWidth, mHeight, mFormat);
144+
mBbq = sp<BLASTBufferQueue>::make("[BBQ] " + mName, /* updateDestinationFrame */ true);
145+
mBbq->update(mBbqChild, mWidth, mHeight, mFormat);
145146

146147
// This surface is always consumed by SurfaceFlinger, so the
147148
// producerControlledByApp value doesn't matter; using false.

libs/gui/include/gui/BLASTBufferQueue.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,6 @@ class BLASTBufferItemConsumer : public BufferItemConsumer {
9090
class BLASTBufferQueue : public ConsumerBase::FrameAvailableListener {
9191
public:
9292
BLASTBufferQueue(const std::string& name, bool updateDestinationFrame = true);
93-
BLASTBufferQueue(const std::string& name, const sp<SurfaceControl>& surface, int width,
94-
int height, int32_t format);
9593

9694
sp<IGraphicBufferProducer> getIGraphicBufferProducer() const {
9795
return mProducer;

libs/gui/tests/BLASTBufferQueue_test.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ class TestBLASTBufferQueue : public BLASTBufferQueue {
8181
public:
8282
TestBLASTBufferQueue(const std::string& name, const sp<SurfaceControl>& surface, int width,
8383
int height, int32_t format)
84-
: BLASTBufferQueue(name, surface, width, height, format) {}
84+
: BLASTBufferQueue(name) {
85+
update(surface, width, height, format);
86+
}
8587

8688
void transactionCallback(nsecs_t latchTime, const sp<Fence>& presentFence,
8789
const std::vector<SurfaceControlStats>& stats) override {

0 commit comments

Comments
 (0)