diff options
author | 2020-08-24 18:18:19 -0700 | |
---|---|---|
committer | 2020-09-16 10:04:12 -0700 | |
commit | 74e17562e4166e11c2e4f33126088c5ed35ea0e7 (patch) | |
tree | 0f2c1593ecb62de6dd3cf3425c90f9a5aaa8dc89 /libs/gui/Surface.cpp | |
parent | 934e82a98dd5a528bef61e035db412963f9ab5f3 (diff) |
SurfaceFlinger: Shared timeline plumbing
Add plumbing to get shared timeline data from Surface Flinger to HWUI
and back.
Bug: 162890382
Bug: 162888881
Test: SF unit tests
Change-Id: Ifb76e6bf28d43c051e6c8ff568437ec9a106b865
Diffstat (limited to 'libs/gui/Surface.cpp')
-rw-r--r-- | libs/gui/Surface.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp index e45b3d1be4..9ce8442579 100644 --- a/libs/gui/Surface.cpp +++ b/libs/gui/Surface.cpp @@ -1207,6 +1207,9 @@ int Surface::perform(int operation, va_list args) case NATIVE_WINDOW_GET_LAST_QUEUED_BUFFER: res = dispatchGetLastQueuedBuffer(args); break; + case NATIVE_WINDOW_SET_FRAME_TIMELINE_VSYNC: + res = dispatchSetFrameTimelineVsync(args); + break; default: res = NAME_NOT_FOUND; break; @@ -1513,6 +1516,14 @@ int Surface::dispatchGetLastQueuedBuffer(va_list args) { return result; } +int Surface::dispatchSetFrameTimelineVsync(va_list args) { + ATRACE_CALL(); + auto frameTimelineVsyncId = static_cast<int64_t>(va_arg(args, int64_t)); + + ALOGV("Surface::dispatchSetFrameTimelineVsync"); + return composerService()->setFrameTimelineVsync(mGraphicBufferProducer, frameTimelineVsyncId); +} + bool Surface::transformToDisplayInverse() { return (mTransform & NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY) == NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY; |