present: Move screen flip functionality in separate file

As a preperation for future flip mode alternatives move most of the
functionality from 'present.c' into a separate file.

Leave some functions needed by future other flip modes in 'present.c'.

Signed-off-by: Roman Gilg <subdiff@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Roman Gilg 2018-03-13 16:00:34 +01:00 committed by Adam Jackson
parent 4303deae78
commit dda7efec36
5 changed files with 1124 additions and 1069 deletions

View File

@ -12,6 +12,7 @@ libpresent_la_SOURCES = \
present_notify.c \
present_priv.h \
present_request.c \
present_scmd.c \
present_screen.c
sdk_HEADERS = present.h presentext.h

View File

@ -5,6 +5,7 @@ srcs_present = [
'present_fence.c',
'present_notify.c',
'present_request.c',
'present_scmd.c',
'present_screen.c',
]

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,12 @@
#include <xfixes.h>
#include <randrstr.h>
#if 0
#define DebugPresent(x) ErrorF x
#else
#define DebugPresent(x)
#endif
extern int present_request;
extern DevPrivateKeyRec present_screen_private_key;
@ -154,57 +160,20 @@ present_get_window_priv(WindowPtr window, Bool create);
/*
* present.c
*/
int
present_pixmap(WindowPtr window,
PixmapPtr pixmap,
CARD32 serial,
RegionPtr valid,
RegionPtr update,
int16_t x_off,
int16_t y_off,
RRCrtcPtr target_crtc,
SyncFence *wait_fence,
SyncFence *idle_fence,
uint32_t options,
uint64_t target_msc,
uint64_t divisor,
uint64_t remainder,
present_notify_ptr notifies,
int num_notifies);
int
present_notify_msc(WindowPtr window,
CARD32 serial,
uint64_t target_msc,
uint64_t divisor,
uint64_t remainder);
void
present_copy_region(DrawablePtr drawable,
PixmapPtr pixmap,
RegionPtr update,
int16_t x_off,
int16_t y_off);
void
present_abort_vblank(ScreenPtr screen, RRCrtcPtr crtc, uint64_t event_id, uint64_t msc);
present_pixmap_idle(PixmapPtr pixmap, WindowPtr window, CARD32 serial, struct present_fence *present_fence);
void
present_vblank_destroy(present_vblank_ptr vblank);
void
present_flip_destroy(ScreenPtr screen);
void
present_restore_screen_pixmap(ScreenPtr screen);
void
present_set_abort_flip(ScreenPtr screen);
void
present_check_flip_window(WindowPtr window);
RRCrtcPtr
present_get_crtc(WindowPtr window);
uint32_t
present_query_capabilities(RRCrtcPtr crtc);
Bool
present_init(void);
present_set_tree_pixmap(WindowPtr window,
PixmapPtr expected,
PixmapPtr pixmap);
/*
* present_event.c
@ -306,6 +275,61 @@ proc_present_dispatch(ClientPtr client);
int
sproc_present_dispatch(ClientPtr client);
/*
* present_scmd.c
*/
int
present_pixmap(WindowPtr window,
PixmapPtr pixmap,
CARD32 serial,
RegionPtr valid,
RegionPtr update,
int16_t x_off,
int16_t y_off,
RRCrtcPtr target_crtc,
SyncFence *wait_fence,
SyncFence *idle_fence,
uint32_t options,
uint64_t target_msc,
uint64_t divisor,
uint64_t remainder,
present_notify_ptr notifies,
int num_notifies);
int
present_notify_msc(WindowPtr window,
CARD32 serial,
uint64_t target_msc,
uint64_t divisor,
uint64_t remainder);
void
present_abort_vblank(ScreenPtr screen, RRCrtcPtr crtc, uint64_t event_id, uint64_t msc);
void
present_vblank_destroy(present_vblank_ptr vblank);
void
present_flip_destroy(ScreenPtr screen);
void
present_restore_screen_pixmap(ScreenPtr screen);
void
present_set_abort_flip(ScreenPtr screen);
void
present_check_flip_window(WindowPtr window);
RRCrtcPtr
present_get_crtc(WindowPtr window);
uint32_t
present_query_capabilities(RRCrtcPtr crtc);
Bool
present_init(void);
/*
* present_screen.c
*/

1048
present/present_scmd.c Normal file

File diff suppressed because it is too large Load Diff