mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
kms/update: Add helper to turn fixed point rect into int rect
Currently unused, but will in the following commit. https://gitlab.gnome.org/GNOME/mutter/merge_requests/826
This commit is contained in:
parent
3e41568074
commit
2a990cc140
@ -27,6 +27,7 @@
|
||||
|
||||
#include "backends/meta-monitor-transform.h"
|
||||
#include "backends/native/meta-kms-types.h"
|
||||
#include "meta/boxes.h"
|
||||
|
||||
struct _MetaKmsPageFlipFeedback
|
||||
{
|
||||
@ -89,4 +90,15 @@ meta_fixed_16_to_int (MetaFixed16 fixed)
|
||||
return fixed / 65536;
|
||||
}
|
||||
|
||||
static inline MetaRectangle
|
||||
meta_fixed_16_rectangle_to_rectangle (MetaFixed16Rectangle fixed_rect)
|
||||
{
|
||||
return (MetaRectangle) {
|
||||
.x = meta_fixed_16_to_int (fixed_rect.x),
|
||||
.y = meta_fixed_16_to_int (fixed_rect.y),
|
||||
.width = meta_fixed_16_to_int (fixed_rect.width),
|
||||
.height = meta_fixed_16_to_int (fixed_rect.height),
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* META_KMS_UPDATE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user