BLASTBufferQueue: Support setFrameTimelineVsync
Surface::setFrameTimelineVsync calls through to SurfaceFlinger
using the IGBP as a token. But of course in the case of BBQ
we have no IGBP on the server side, and this will produce errors.
To fix this we continue overriding Surface methods in the BBQSurface
, and forward through to the SurfaceControl variants of the function.
Unlike the previous CL for setFrameRate, this is a currently un-released
API, and so I'd also like to investigate as a follow-up...can we go
SurfaceControl path only?
Bug: 170890018
Test: Existing tests pass
Change-Id: I5316c38f462c3808d5769ede6666594b911c8242
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp
index 9ce8442..167bef1 100644
--- a/libs/gui/Surface.cpp
+++ b/libs/gui/Surface.cpp
@@ -1521,7 +1521,7 @@
auto frameTimelineVsyncId = static_cast<int64_t>(va_arg(args, int64_t));
ALOGV("Surface::dispatchSetFrameTimelineVsync");
- return composerService()->setFrameTimelineVsync(mGraphicBufferProducer, frameTimelineVsyncId);
+ return setFrameTimelineVsync(frameTimelineVsyncId);
}
bool Surface::transformToDisplayInverse() {
@@ -2288,4 +2288,9 @@
return composerService()->setFrameRate(mGraphicBufferProducer, frameRate, compatibility);
}
+status_t Surface::setFrameTimelineVsync(int64_t frameTimelineVsyncId) {
+ return composerService()->setFrameTimelineVsync(mGraphicBufferProducer,
+ frameTimelineVsyncId);
+}
+
}; // namespace android