mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-05 04:27:09 +00:00
feat(proto): add Snapshot RPC for atomic hierarchy+screenshot
Pairs hierarchy and screenshot in a single response so the runner can capture both under a backend mutex, avoiding the cross-fade race where the two reads describe different frames.
This commit is contained in:
1 parent
a1390aecdd
commit
5a19ef885f
3 files changed
+193
-77
No files matched your search
@@ -18,6 +18,10 @@ service Driver {
|
||||
|
||||
rpc Screenshot(Empty) returns (Image);
|
||||
rpc Hierarchy(Empty) returns (HierarchyJSON);
|
||||
// Snapshot captures hierarchy and screenshot back-to-back under a
|
||||
// backend-side mutex so the pair describes the same on-device frame.
|
||||
// Use this instead of racing Hierarchy and Screenshot from the runner.
|
||||
rpc Snapshot(Empty) returns (SnapshotResponse);
|
||||
rpc RecentLogs(RecentLogsRequest) returns (LogEntries);
|
||||
|
||||
rpc WaitForIdle(Duration) returns (Empty);
|
||||
@@ -56,6 +60,11 @@ message HierarchyJSON {
|
||||
string json = 1;
|
||||
}
|
||||
|
||||
message SnapshotResponse {
|
||||
HierarchyJSON hierarchy = 1;
|
||||
Image screenshot = 2;
|
||||
}
|
||||
|
||||
message Duration {
|
||||
int64 millis = 1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user