Combine Buffer Properties when calling setBuffer
There are several properties, like releaseCallback, acquireFence,
frameNumber, that are tied to the buffer being set. If a new buffer is
set, all those properties should also be overwritten, rather than
through a separate call.
1. Remove Transaction.setAcquireFence and Transaction.setFrameNumber and
added them to the setBuffer as optional
2. Combine all the buffer info into a struct called BufferData that's
sent to SF as one. This will also help with merging or overwriting
buffer data since the callback, frameNumber, and acquireFence should
also be updated.
3. Combine the functions in SF so there's no longer a separate call to
BSL to set fence. Instead, send all buffer related data to BSL.setBuffer
Test: SurfaceFlinger_test
Fixes: 200065015
Change-Id: I53ad12dd105cd4cac6c3a7ecd48279d1b3cd2b8f
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 141d7ac..5ef3fff 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -363,6 +363,10 @@
return static_cast<bool>(findDisplay(p));
}
+ bool exceedsMaxRenderTargetSize(uint32_t width, uint32_t height) const {
+ return width > mMaxRenderTargetSize || height > mMaxRenderTargetSize;
+ }
+
private:
friend class BufferLayer;
friend class BufferQueueLayer;
@@ -939,10 +943,6 @@
void readPersistentProperties();
- bool exceedsMaxRenderTargetSize(uint32_t width, uint32_t height) const {
- return width > mMaxRenderTargetSize || height > mMaxRenderTargetSize;
- }
-
uint32_t getMaxAcquiredBufferCountForCurrentRefreshRate(uid_t uid) const;
/*