Adding testing for slot generation
Bug: 129351223
Test: build, boot, libsurfaceflinger_unittest
Change-Id: Ieb4d16d11b287bbb66a364b6d4c633305555b518
diff --git a/services/surfaceflinger/BufferStateLayer.h b/services/surfaceflinger/BufferStateLayer.h
index 12f0141..13186dd 100644
--- a/services/surfaceflinger/BufferStateLayer.h
+++ b/services/surfaceflinger/BufferStateLayer.h
@@ -29,6 +29,8 @@
namespace android {
+class SlotGenerationTest;
+
class BufferStateLayer : public BufferLayer {
public:
explicit BufferStateLayer(const LayerCreationArgs&);
@@ -134,6 +136,7 @@
void setHwcLayerBuffer(const sp<const DisplayDevice>& display) override;
private:
+ friend class SlotGenerationTest;
void onFirstRef() override;
bool willPresentCurrentTransaction() const;
@@ -170,6 +173,7 @@
uint32_t getHwcCacheSlot(const client_cache_t& clientCacheId);
private:
+ friend class SlotGenerationTest;
uint32_t addCachedBuffer(const client_cache_t& clientCacheId) REQUIRES(mMutex);
uint32_t getFreeHwcCacheSlot() REQUIRES(mMutex);
void evictLeastRecentlyUsed() REQUIRES(mMutex);