mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-24 17:10:05 +01:00
present: Move msc_is_(equal_or_)after to the top of present.c
To make them usable from any other function in the file. No functional
change.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
(cherry picked from commit 1a9f8c4623)
This commit is contained in:
parent
8869f45a96
commit
cf30b7cfd6
1 changed files with 22 additions and 22 deletions
|
|
@ -45,6 +45,28 @@ static struct xorg_list present_flip_queue;
|
|||
static void
|
||||
present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc);
|
||||
|
||||
/*
|
||||
* Returns:
|
||||
* TRUE if the first MSC value is after the second one
|
||||
* FALSE if the first MSC value is equal to or before the second one
|
||||
*/
|
||||
static Bool
|
||||
msc_is_after(uint64_t test, uint64_t reference)
|
||||
{
|
||||
return (int64_t)(test - reference) > 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns:
|
||||
* TRUE if the first MSC value is equal to or after the second one
|
||||
* FALSE if the first MSC value is before the second one
|
||||
*/
|
||||
static Bool
|
||||
msc_is_equal_or_after(uint64_t test, uint64_t reference)
|
||||
{
|
||||
return (int64_t)(test - reference) >= 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Copies the update region from a pixmap to the target drawable
|
||||
*/
|
||||
|
|
@ -717,28 +739,6 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc)
|
|||
present_vblank_destroy(vblank);
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns:
|
||||
* TRUE if the first MSC value is after the second one
|
||||
* FALSE if the first MSC value is equal to or before the second one
|
||||
*/
|
||||
static Bool
|
||||
msc_is_after(uint64_t test, uint64_t reference)
|
||||
{
|
||||
return (int64_t)(test - reference) > 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns:
|
||||
* TRUE if the first MSC value is equal to or after the second one
|
||||
* FALSE if the first MSC value is before the second one
|
||||
*/
|
||||
static Bool
|
||||
msc_is_equal_or_after(uint64_t test, uint64_t reference)
|
||||
{
|
||||
return (int64_t)(test - reference) >= 0;
|
||||
}
|
||||
|
||||
int
|
||||
present_pixmap(WindowPtr window,
|
||||
PixmapPtr pixmap,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue