Pass in format when creating and updating BBQ.
Pixel format should be passed in when creating or updating BBQ since the
format is set on the consumer.
Test: go/wm-smoke
Bug: 177557720
Change-Id: Ib9137eb83d4014d98e9022527d21ad67765caad0
diff --git a/libs/gui/include/gui/BLASTBufferQueue.h b/libs/gui/include/gui/BLASTBufferQueue.h
index 0fbcbdc..411526e 100644
--- a/libs/gui/include/gui/BLASTBufferQueue.h
+++ b/libs/gui/include/gui/BLASTBufferQueue.h
@@ -68,7 +68,7 @@
{
public:
BLASTBufferQueue(const std::string& name, const sp<SurfaceControl>& surface, int width,
- int height, bool enableTripleBuffering = true);
+ int height, int32_t format, bool enableTripleBuffering = true);
sp<IGraphicBufferProducer> getIGraphicBufferProducer() const {
return mProducer;
@@ -88,7 +88,7 @@
void setTransactionCompleteCallback(uint64_t frameNumber,
std::function<void(int64_t)>&& transactionCompleteCallback);
- void update(const sp<SurfaceControl>& surface, uint32_t width, uint32_t height);
+ void update(const sp<SurfaceControl>& surface, uint32_t width, uint32_t height, int32_t format);
void flushShadowQueue() { mFlushShadowQueue = true; }
status_t setFrameRate(float frameRate, int8_t compatibility, bool shouldBeSeamless);
@@ -136,6 +136,7 @@
ui::Size mSize GUARDED_BY(mMutex);
ui::Size mRequestedSize GUARDED_BY(mMutex);
+ int32_t mFormat GUARDED_BY(mMutex);
uint32_t mTransformHint GUARDED_BY(mMutex);