Skip to content

Commit 80436ed

Browse files
authored
Merge pull request #24 from ardera/feature-vsync
implement vsync
2 parents 530049f + 4331fac commit 80436ed

File tree

2 files changed

+199
-144
lines changed

2 files changed

+199
-144
lines changed

include/flutter-pi.h

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,37 @@
1111

1212
#define EGL_PLATFORM_GBM_KHR 0x31D7
1313

14+
typedef enum {
15+
kVBlankRequest,
16+
kVBlankReply,
17+
kFlutterTask
18+
} flutterpi_task_type;
19+
1420
struct flutterpi_task {
1521
struct flutterpi_task* next;
16-
bool is_vblank_event;
22+
flutterpi_task_type type;
1723
union {
1824
FlutterTask task;
19-
drmVBlankReply vbl;
25+
struct {
26+
uint64_t vblank_ns;
27+
intptr_t baton;
28+
};
2029
};
2130
uint64_t target_time;
2231
};
2332

33+
void post_platform_task(struct flutterpi_task *task);
34+
2435
struct drm_fb {
2536
struct gbm_bo *bo;
2637
uint32_t fb_id;
2738
};
2839

40+
struct pageflip_data {
41+
struct gbm_bo *releaseable_bo;
42+
intptr_t next_baton;
43+
};
44+
2945
// position & pointer phase of a mouse pointer / multitouch slot
3046
// A 10-finger multi-touch display has 10 slots and each of them have their own position, tracking id, etc.
3147
// All mouses / touchpads share the same mouse pointer.

0 commit comments

Comments
 (0)