diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-06-08 10:07:59 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-08 10:07:59 +0200 |
| commit | 6967a31450441fc5605c05db6f65505dace4b263 (patch) | |
| tree | 255a3cff7f3e2eb8a50c952eab9b270a7937561d /src/helpers/Region.cpp | |
| parent | c31d9ef4172452f6f219f91d9b87a24d91f0cf3a (diff) | |
wayland/core: move to new impl (#6268)
* wayland/core/dmabuf: move to new impl
it's the final countdown
Diffstat (limited to 'src/helpers/Region.cpp')
| -rw-r--r-- | src/helpers/Region.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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 <wlr/util/region.h> } +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); } |
