| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
_cogl_util_get_eye_planes_for_screen_poly() is quite a complicated beast. Ever
since Clutter became a compositor toolkit, and specially after we switched to
graphene_frustum_t on paint volumes, we can brutally simplify this function.
The new code assumes camera is at (0, 0, 0) at world coordinates (i.e. before
applying the projection). We also consider that the redraw clip are at stage
coordinates. That means that converting the clip rectangle to world rectangle
is simply a matter of projecting the corresponding vertices using the "view"
matrix. Furthermore, we only need to project the top-left, and bottom-right
vertices, since top-right and bottom-left can be derived from those two.
The frustum setup still uses triplets of vertices to setup the planes, except
now the first vertex is always the camera (hardcoded to 0, 0, 0), and the other
two vertices are the projected clip rectangle vertices.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
|
|
| |
We guarantee to never pass NULL clips anymore, so there's no need
to check for such case.
Remove the check for NULL clip, and remove all related variables.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
| |
We can trust the clip frusta array to encode this information now.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
|
|
|
|
| |
The redraw clip region may contain multiple clip rectangles. We currently
only use the extents of this region, but having multiple frusta for each
rectangle is a better alternative, and will allow us to remove the extra
projection we currently do.
Make the clip frustum an array, with multiple frusta.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
| |
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
| |
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
|
|
|
| |
The clip planes / frustum are contextual to painting. In the past, for
the lack of a better place, it was added to ClutterStage, but now we
have an appropriate home for such data: ClutterPaintContext.
Move the frustum to the paint context.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While refactoring the clipping planes / frustum code, it became more and
more evident that we do not need to update them while picking. Picking
nowadays goes through a completely different code path, that does not
rely on paint volume culling.
While it might be interesting to eventually also cull out based on paint
volumes, it certainly won't go through the painting code anymore.
Remove setting up the view when picking, and rename functions appropriatedly.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
|
|
|
| |
Culling paint volumes don't give this level of detail anymore, and in
fact knowing whether it was partially or fully in was only being used
in a debug path. For the purposes of culling, it doesn't matter if a
given actor is partially or completely inside the frustum; either way,
it must be painted.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
| |
To improve legibility of the code.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of 4 planes, use a graphene_frustum_t to store the clipping
planes.
The cautious reviewer might noticed that we are now setting up 6
planes: the 4 planes we were doing before, plus 2 extra planes in
the Z axis. These extra planes simulate an "infinite" Z far, and
an "on-camera" Z near.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
| |
It is unused now.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
| |
Retrieving the stage from the actor is almost free, but this is a
hot path anyway and we can bail out before that.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
| |
The stage clip is *never* NULL - it is a structure field of ClutterStage
itself.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
| |
It allows us to remove quite a bunch of code, and not deal with part
of the mind-melting maths behind it.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ClutterStage defines the 8 vertices of a frustum:
4 ----------------------------- 5
| \ / |
| \ / |
| 0 --------------------- 1 |
| | | |
| | | |
| 3 --------------------- 2 |
| / \ |
| / \ |
7 ----------------------------- 6
Then, it uses triplets of vertices to create each clipping plane.
It only sets up 4 planes (it doesn't clip based on depth), defined
by the following vertices:
* 0 - 4 - 5
* 1 - 5 - 6
* 2 - 6 - 7
* 0 - 7 - 4
The first 3 triplets are selected using the for-loop. However, the
last triplet is different, and is done out of the loop. It could
have been made simpler by using the "3 - 7 - 4" triplet.
Simplify the current code by using the suggested triplet, calculated
inside the for-loop.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
|
| |
Instead of our own implementation that upscales, then downscales back,
use graphene_matrix_inverse() directly. This is possible after switching
to a z-near value that doesn't have problems with float precision.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
|
| |
It doesn't actually matter, since we don't really have cases where we
cross this value, but it's enough to prevent catastrophic cancellation
due to very small float numbers.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
|
|
|
|
| |
Picking is specially sensitive for float precision, and tests can
easily fail when something changes, even if ever so slightly. A
simple way to workaround this is by adjusting the projected points
using the same procedure described at 67cc60cbda.
Round projected points for picking to 256ths.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
|
| |
It'll be reused in other bits of the Clutter codebase. Move it to
an inline function in clutter-private.h
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1489
|
|
|
|
|
|
| |
This can't possibly be used by introspected languages as it is a raw struct.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1413
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The timestamp sent with _NET_WM_FRAME_DRAWN should be in "high
resolution X server timestamps", meaning they should have the same scope
as the built in X11 32 bit unsigned integer timestamps, i.e. overflow at
the same time.
This was not done correctly when mutter had determined the X server used
the monotonic clock, where it'd just forward the monotonic clock,
confusing any client using _NET_WM_FRAME_DRAWN and friends.
Fix this by 1) splitting the timestamp conversiot into an X11 case and a
display server case, where the display server case simply clamps the
monotonic clock, as it is assumed Xwayland is always usign the monotonic
clock, and 2) if we're a X11 compositing manager, if the X server is
using the monotonic clock, apply the same semantics as the display
server case and always just clamp, or if not, calculate the offset every
10 seconds, and offset the monotonic clock timestamp with the calculated
X server timestamp offset.
This fixes an issue that would occur if mutter (or rather GNOME Shell)
would have been started before a X11 timestamp overflow, after the
overflow happened. In this case, GTK3 clients would get unclamped
timestamps, and get very confused, resulting in frames queued several
weeks into the future.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1494
|
|
|
|
|
|
|
| |
This way there is less risk of ending up with would-be negative unsigned
values.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1494
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mutter sends a proximity-in event before the required tablet tool
resource is properly allocated on the client. This is violating the
Wayland protocol. Because libwayland ignores events for objects it
doesn't know yet, this is not noticeable in most applications. However,
if https://gitlab.freedesktop.org/wayland/wayland/-/issues/176 gets
fixed, these applications would likely crash immediately. Therefore this
PR removes the responsible code which, again, shouldn't have any effect
on client applications as they ignore this event anyway.
Relevant part of the spec:
This event can be received when the tool has moved from one surface to
another, or when the tool has come back into proximity above the
surface.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1427
|
|
|
|
|
|
|
| |
If Xwayland was built with the X Security extension enabled, it should
be safe to use, there is no need to disable it by default from mutter.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1485
|
|
|
|
| |
(cherry picked from commit 103d798775de27bce10fc8827b2b7b5f79fb2ff7)
|
|
|
|
|
|
|
|
| |
The newline character `\n` in the schema does not produce a new line.
Use a newline instead.
fixes: dbe44f3a83e6a6bdc611bb298e3781a0aebbbd7b
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1483
|
|
|
|
|
|
| |
They resulted in empty lines in the log.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1466
|
|
|
|
| |
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1466
|
|
|
|
|
|
|
|
| |
Unlike g_* logging utilities, the meta_* counterparts behave like odd
printf() functions. Lets change that so they fit better into how logging
is done everywhere else.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1466
|
|
|
|
| |
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1481
|
|
|
|
|
|
|
| |
The key was added in https://gitlab.gnome.org/GNOME/mutter/-/commit/af9df1e5b62b253e5f1d5f6eff89e45e3bed81b3
but not added to the list due to the string freeze.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1481
|
|
|
|
| |
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1481
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we resize a window we send it configure requests with size
suggestion. Some clients, e.g. gnome-terminal will limit its size to a
discrete set given the font size resulting in the size often not being
respected completely, but used as a hint to find a size as large as
possible but not larger than the configured size.
When doing an interactive resize dragging the right or top side of a
window, this caused issues with the configured window size not matching
the one used by the client, as the configured position wouldn't be
correct for the actual size. Fix this by offsetting the position given
the size mismatch offset, making the position again in sync with the
size.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1447
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1477
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Keeping track of the projected position is costly, and adds quite some complexity
to ClutterOffscreenEffect.pre_paint(). As far as research goes, there's not a
single consumer of this function that uses the position for anything - only size
is used.
Remove clutter_offscreen_effect_get_target_rect(), and drop the annoying position
field from ClutterOffscreenEffect as well. This allows us to stop projecting the
position on pre-paint, and simplify things.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1474
|
|
|
|
|
|
| |
We don't read the x/y position anyway.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1474
|
|
|
|
|
|
| |
clutter_offscreen_effect_get_target_rect() is going away soon.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1474
|
|
|
|
|
|
|
| |
Rename clutter_offscreen_effect_get_material() to get_pipeline() and
make it return (actually, stop casting to) a CoglMaterial.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1474
|
|
|
|
|
|
|
|
| |
ClutterPipelineNode will be used by GNOME Shell in the future.
Fortunately for us, CoglPipeline is already usable from GJS,
so we don't need to skip the constructor for the pipeline node.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1474
|
|
|
|
|
|
|
| |
Simply chain up to get the pre and post paint methods,
instead of reimplementing ClutterEffect.paint()
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1474
|
|
|
|
|
|
|
|
| |
Move unreffing the framebuffer to ClutterOffscreenEffect.pre_paint().
This will allow us to properly chain up ClutterOffscreenEffect.paint()
and not reimplement exactly what ClutterEffect does by default.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1474
|
|
|
|
|
|
| |
They're not used outside ClutterEffect.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1474
|
|
|
|
|
|
|
| |
All events should be allocated, stack allocation is avoided and should
be avoided in the future, probably by making ClutterEvent structs opaque.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1475
|
|
|
|
|
|
|
| |
Peeking doesn't seem such a good idea when we switch to async queues.
Luckily nobody seems to be using this.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1475
|
|
|
|
|
|
| |
It's nicer to propagate along.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1475
|
|
|
|
|
|
|
|
|
|
|
| |
Use a typedef for MetaRemoteDesktop, so tests poking MetaBackend don't
indirectly depend upon generated headers. This is arguably a code fix
for a build system bug.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1470
Fixes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1449
(or something...)
|
|
|
|
|
|
| |
They have been replaced with using debug string parsing and topics.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1465
|
|
|
|
|
|
|
|
|
|
|
| |
This makes it possible to run e.g.
env MUTTER_DEBUG=input:geometry gnome-shell
which will enable the 'META_DEBUG_INPUT' and 'META_DEBUG_GEOMETRY'
topics.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1465
|
|
|
|
| |
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1465
|
|
|
|
| |
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1465
|