Skip to content

Commit

Permalink
Merge pull request #24 from ardera/feature-vsync
Browse files Browse the repository at this point in the history
implement vsync
  • Loading branch information
ardera committed Jan 12, 2020
2 parents 530049f + 4331fac commit 80436ed
Show file tree
Hide file tree
Showing 2 changed files with 199 additions and 144 deletions.
20 changes: 18 additions & 2 deletions include/flutter-pi.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,37 @@

#define EGL_PLATFORM_GBM_KHR 0x31D7

typedef enum {
kVBlankRequest,
kVBlankReply,
kFlutterTask
} flutterpi_task_type;

struct flutterpi_task {
struct flutterpi_task* next;
bool is_vblank_event;
flutterpi_task_type type;
union {
FlutterTask task;
drmVBlankReply vbl;
struct {
uint64_t vblank_ns;
intptr_t baton;
};
};
uint64_t target_time;
};

void post_platform_task(struct flutterpi_task *task);

struct drm_fb {
struct gbm_bo *bo;
uint32_t fb_id;
};

struct pageflip_data {
struct gbm_bo *releaseable_bo;
intptr_t next_baton;
};

// position & pointer phase of a mouse pointer / multitouch slot
// A 10-finger multi-touch display has 10 slots and each of them have their own position, tracking id, etc.
// All mouses / touchpads share the same mouse pointer.
Expand Down
Loading

0 comments on commit 80436ed

Please sign in to comment.