dvr_vsync.h revision 2251d822dac2a96aad4184a6fdc2690f0a58af7c
1#ifndef ANDROID_DVR_VSYNC_H_
2#define ANDROID_DVR_VSYNC_H_
3
4#include <stdint.h>
5#include <sys/cdefs.h>
6
7__BEGIN_DECLS
8
9typedef struct DvrVSyncClient DvrVSyncClient;
10
11// Creates a new client to the system vsync service.
12int dvrVSyncClientCreate(DvrVSyncClient** client_out);
13
14// Destroys the vsync client.
15void dvrVSyncClientDestroy(DvrVSyncClient* client);
16
17// Get the estimated timestamp of the next GPU lens warp preemption event in/
18// ns. Also returns the corresponding vsync count that the next lens warp
19// operation will target.
20int dvrVSyncClientGetSchedInfo(DvrVSyncClient* client, int64_t* vsync_period_ns,
21                               int64_t* next_timestamp_ns,
22                               uint32_t* next_vsync_count);
23
24__END_DECLS
25
26#endif  // ANDROID_DVR_VSYNC_H_
27