Commit 2a990cc1 authored by Jonas Ådahl's avatar Jonas Ådahl

kms/update: Add helper to turn fixed point rect into int rect

Currently unused, but will in the following commit.

!826
parent 3e415680
......@@ -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 */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment