From 6967a31450441fc5605c05db6f65505dace4b263 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 8 Jun 2024 10:07:59 +0200 Subject: wayland/core: move to new impl (#6268) * wayland/core/dmabuf: move to new impl it's the final countdown --- src/helpers/Region.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/helpers/Region.cpp') diff --git a/src/helpers/Region.cpp b/src/helpers/Region.cpp index 20eaf452..9e572b34 100644 --- a/src/helpers/Region.cpp +++ b/src/helpers/Region.cpp @@ -4,6 +4,8 @@ extern "C" { #include } +constexpr const int64_t MAX_REGION_SIDE = 10000000; + CRegion::CRegion() { pixman_region32_init(&m_rRegion); } @@ -103,6 +105,11 @@ CRegion& CRegion::transform(const wl_output_transform t, double w, double h) { return *this; } +CRegion& CRegion::rationalize() { + intersect(CBox{-MAX_REGION_SIDE, -MAX_REGION_SIDE, MAX_REGION_SIDE * 2, MAX_REGION_SIDE * 2}); + return *this; +} + CRegion CRegion::copy() const { return CRegion(*this); } -- cgit v1.2.3