SF: Make ExternalTexture mockable
Expose GraphicBuffer properties via ExternalTexture class. Within
SurfaceFlinger access the buffer via this proxy interface.
This allows us to inject and mock GraphicBuffers as needed.
Specifically this will be used to recreate layer state from
transaction traces.
Test: compiles
Bug: 200284593
Change-Id: I2e7f6bee28314b70eac477cfadbf9f94c4d70339
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 31cdf0b..0d2618a 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -416,8 +416,10 @@
// Used only to set BufferStateLayer state
virtual bool setTransform(uint32_t /*transform*/) { return false; };
virtual bool setTransformToDisplayInverse(bool /*transformToDisplayInverse*/) { return false; };
- virtual bool setBuffer(const BufferData&, nsecs_t /*postTime*/, nsecs_t /*desiredPresentTime*/,
- bool /*isAutoTimestamp*/, std::optional<nsecs_t> /* dequeueTime */,
+ virtual bool setBuffer(std::shared_ptr<renderengine::ExternalTexture>& /* buffer */,
+ const BufferData& /* bufferData */, nsecs_t /* postTime */,
+ nsecs_t /*desiredPresentTime*/, bool /*isAutoTimestamp*/,
+ std::optional<nsecs_t> /* dequeueTime */,
const FrameTimelineInfo& /*info*/) {
return false;
};