Pass in framenumbers if submitting buffers via BlastBufferQueue
The framenumber generated by the graphics producer is forwarded to mimic BufferQueue behaviour.
Test: atest SurfaceViewBufferTests
Bug: 168504870
Change-Id: Ic652a585d10d7e14c9dd94afaabd0e485e209ede
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 88ece50..bdc4f84 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -187,7 +187,7 @@
// If set, defers this state update until the identified Layer
// receives a frame with the given frameNumber
wp<Layer> barrierLayer_legacy;
- uint64_t frameNumber_legacy;
+ uint64_t barrierFrameNumber;
// the transparentRegion hint is a bit special, it's latched only
// when we receive a buffer -- this is because it's "content"
@@ -406,7 +406,7 @@
virtual bool setFrame(const Rect& /*frame*/) { return false; };
virtual bool setBuffer(const sp<GraphicBuffer>& /*buffer*/, const sp<Fence>& /*acquireFence*/,
nsecs_t /*postTime*/, nsecs_t /*desiredPresentTime*/,
- const client_cache_t& /*clientCacheId*/) {
+ const client_cache_t& /*clientCacheId*/, uint64_t /* frameNumber */) {
return false;
};
virtual bool setAcquireFence(const sp<Fence>& /*fence*/) { return false; };
@@ -510,6 +510,8 @@
virtual bool shouldPresentNow(nsecs_t /*expectedPresentTime*/) const { return false; }
+ virtual uint64_t getHeadFrameNumber(nsecs_t /* expectedPresentTime */) const { return 0; }
+
/*
* called after composition.
* returns true if the layer latched a new buffer this frame.