Bilal Elmoussaoui
39aeb81a8b
region: Move Region.apply_matrix_transform_expand to Mtk
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3501 >
2024-01-09 18:47:34 +00:00
Bilal Elmoussaoui
4d53e4d156
region: Move Region.crop_and_scale to Mtk
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3501 >
2024-01-09 18:47:34 +00:00
Bilal Elmoussaoui
6e7d314e75
region: Move Region.scale to Mtk
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3501 >
2024-01-09 18:47:34 +00:00
Bilal Elmoussaoui
4513abd584
region: Move rectangle helper macro to Mtk
...
Rename it to Rectangle prefix to avoid confusion with MtkRegion
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3501 >
2024-01-09 18:47:34 +00:00
Bilal Elmoussaoui
59457dff81
boxes: Move Rectangle.crop_and_scale to Mtk
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3501 >
2024-01-09 18:47:34 +00:00
Bilal Elmoussaoui
c683d971a1
compositor: Move region_to_cairo_path helper where it is used
...
The helper is X11 specific and only used once in that file. Moving
it there would help us in the future to build without cairo if x11 is disabled
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3292 >
2023-11-03 11:27:52 +00:00
Bilal Elmoussaoui
655b4a9c75
Port to MtkRegion
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3292 >
2023-11-03 11:27:52 +00:00
Bilal Elmoussaoui
1abef24154
mtk: Move Rectangle.from_graphene_rect from Meta
...
And drop the clutter helper
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3128 >
2023-08-30 16:46:14 +02:00
Bilal Elmoussaoui
a93471eb90
mtk: Move Rectangle.to_graphene_rect from Meta
...
Also drops the clutter equivalent
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3128 >
2023-08-30 16:46:14 +02:00
Bilal Elmoussaoui
918ae0f4d4
mutter: Replace cairo_rectangle_int_t with MtkRectangle
...
Note: the various helpers in boxes.c were not ported yet, see the next
commit. This was intentionally done to simplify the porting process
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3128 >
2023-08-30 16:46:13 +02:00
Michel Dänzer
3b847f28ad
Remove unused meta_region_scale_double
...
Unused since 8b3c1f4b876e ("cullable: Generalize actor coordinates space
translation for regions").
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3154 >
2023-08-12 19:53:46 +00:00
msizanoen1
8b3c1f4b87
cullable: Generalize actor coordinates space translation for regions
...
This allows MetaCullable to work with actors using arbitrary transforms
which will be needed for implementing surface pixel alignment for
fractional-scale-v1.
This also deletes meta_cullable_is_untransformed as it's no longer
necessary, and we can also stop manually scaling the region objects
while performing opaque region culling in surfaces since it's now
handled transparently by the new `meta_cullable_cull_out_children`
implementation.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2726 >
2023-05-22 14:44:33 +00:00
Carlos Garnacho
1fbbb73343
compositor: Add utility function to convert region to cairo_t path
...
We were relying on gdk_cairo_region() to convert a cairo_region_t
into a path ready to fill/stroke in a cairo_t. This is a small
and detached helper that we can do ourselves, so put it together
with all other region helper functions.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2864 >
2023-03-03 20:17:01 +00:00
Robert Mader
1bfd932f15
region-utils: Fix typo in crop_and_scale() fastpath
...
Fixes 09b1bbb1cf64ec5e90396d4cedd4bbd84df899a1
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1786 >
2021-03-29 15:17:48 +00:00
Robert Mader
09b1bbb1cf
region-utils: Always use FLT_EPSILON when comparing floating point values
...
As you should always do. Using the `float` variant even if `scale` is
a `double` as values passed in are potentially computed at `float`
precission.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1565 >
2020-11-16 19:27:20 +01:00
Robert Mader
91c9416259
region-utils: Reduce temporary allocations
...
This applies the optimizations from 0c55e87d8fb70848e to serveral
similar places in region-utils.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1565 >
2020-11-16 19:27:20 +01:00
Jonas Ådahl
03c65b93e6
region-utils: Make transform util const correct
...
The input should be const, as it will not be altered.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1237
2020-05-26 13:54:28 +00:00
Georges Basile Stavracas Neto
94682e69aa
Replace ClutterRect by graphene_rect_t
...
https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:14 +00:00
Robert Mader
07e65a6ef2
region-utils: Add API to crop and scale an integer region
...
https://gitlab.gnome.org/GNOME/mutter/merge_requests/323
2019-02-06 12:24:02 +00:00
Robert Mader
686b7f8baa
boxes: Add API to transform a MetaRectangle
...
To be used if not a whole region needs to get transformed.
It also has an argument for reverse-transforms.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/366
2019-01-05 14:18:25 +01:00
Robert Mader
676a8da005
monitor-transform: Move helper functions into their own file
...
The existing ones are statically inlined, so there is no .c file
right now.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/366
2019-01-05 14:15:23 +01:00
Jonas Ådahl
36b46af92f
boxes: Add helper to scale rectangles by a double
...
And change the similar region scaling helper to use this one.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/362
2019-01-03 10:26:13 +00:00
Robert Mader
452ef4d5bb
region-utils: Add API to transform an integer region
...
The added API requires additional width and height arguments
to calculate transformed coordinates.
2018-12-03 18:58:17 +01:00
Jonas Ådahl
2f4a68c8c3
Clean up include macros mess
...
The order and way include macros were structured was chaotic, with no
real common thread between files. Try to tidy up the mess with some
common scheme, to make things look less messy.
2018-11-06 17:17:36 +01:00
Jonas Ådahl
9c77e52ad3
region-utils: Add API to scale an integer region with a double
...
The added API lets the caller decide whether to shrink or grow the
rectangles if there are rounding issues.
Related: https://gitlab.gnome.org/GNOME/mutter/issues/300
2018-10-04 15:06:10 +02:00
Jonas Ådahl
bbcee174ce
wayland: Make the surface actor set its own state
...
Since the surface actor knows more about how it draws itself, instead of
pushing texture state (buffer and scale), input region and opaque region
from MetaWaylandSurface after having transformed into what the surface
actor expects, make the surface actor set its own state given what state
the Wayland surface is in.
https://bugzilla.gnome.org/show_bug.cgi?id=744933
2015-03-03 14:53:15 -05:00
Jasper St. Pierre
25a16c3379
Remove trailing whitespace
2014-05-02 09:34:48 -04:00
Andika Triwidada
fbec4718f8
Changed obsolete FSF postal address into generic URL.
...
Fix https://bugzilla.gnome.org/show_bug.cgi?id=721517 #2
2014-01-12 08:42:06 +07:00
Jasper St. Pierre
ac18f41ed1
window-actor: Use MetaRegionBuilder when scanning the visible region
...
This gives a pretty solid performance improvement when resizing windows.
2012-05-25 17:31:06 -04:00
Colin Walters
6596374886
region-utils.c: Squash a memory leak
...
"chunk" was an allocated but unused variable.
https://bugzilla.gnome.org/show_bug.cgi?id=649504
2011-05-11 14:15:48 -04:00
Owen W. Taylor
3f9c375f1c
MetaRegionIterator: avoid reading off end of rectangles array
...
Fix an off-by-one error in the check for "can we peek ahead to the next
rectangle".
https://bugzilla.gnome.org/show_bug.cgi?id=636491
2010-12-06 12:00:30 -05:00
Owen W. Taylor
9f4942e9a7
Make shadows pretty and configurable
...
The current shadow code just uses a single fixed texture (the Gaussian
blur of a rectangle with a fixed blur radius) for drawing all window
shadows. This patch adds the ability
* Implement efficient blurring of arbitrary regions by approximating
a Gaussian blur with multiple box blurs.
* Detect when multiple windows can use the same shadow texture by
converting their shape into a size-invariant MetaWindowShape.
* Add properties shadow-radius, shadow-x-offset, shadow-y-offset,
shadow-opacity to allow the shadow for a window to be configured.
* Add meta_window_actor_paint() and draw the shadow directly
from there rather than using a child actor.
* Remove TidyTextureFrame, which is no longer used
https://bugzilla.gnome.org/show_bug.cgi?id=592382
2010-11-18 09:47:56 -05:00