33365 Commits

Author SHA1 Message Date
Gert-dev
110bdf0e9f meta/renderer: Split up meta_renderer_native_gles3_blit_shared_bo
Split off meta_create_gbm_bo_egl_image from
meta_renderer_native_gles3_blit_shared_bo.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4027>
2025-01-02 16:59:00 +00:00
Cas Pascal
840b801487 Update Vietnamese translation 2025-01-01 07:17:57 +00:00
Cas Pascal
af9a31a9b0 Update Vietnamese translation
(cherry picked from commit 9e11a656945ccd1f457c38b6ed9d8c63d70683cb)
2025-01-01 06:57:18 +00:00
Bilal Elmoussaoui
5621134399 clutter: Make cairo dependant on fonts build option
As it is only used there. Once we have removed cairo usage from meta, we
can make it tests specific.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:12 +00:00
Bilal Elmoussaoui
32c5faf010 build: Add a new fonts option
Allowing to disable font rendering integration, making it possible to
build Mutter without pango/harfbuzz/fribidi dependencies.

This commit also adds a new clutter-pango header that is used to include
pango specific bits.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:12 +00:00
Bilal Elmoussaoui
b0b1e0ef4e clutter: Inline character direction detection helper
By doing so, we can make the fribidi dependency specific to having x11
backend or fonts rendering support.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:11 +00:00
Bilal Elmoussaoui
fb48766710 clutter: Move pango helper to clutter/pango
As it is only used by the pango integration bits, so it can be disabled
along with the rest of it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:11 +00:00
Bilal Elmoussaoui
4313c2bb58 clutter: Move Text actor to clutter/pango
Similar to ClutterText node in the previous commit.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:10 +00:00
Bilal Elmoussaoui
c15bb5d49c clutter: Move TextNode to a separate header
By moving it into clutter/pango, we can make it optional along with all
the pango usages. See the next commits.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:09 +00:00
Bilal Elmoussaoui
2c308caf72 clutter/context: Make get_font_map private
It is only used internally by ClutterActor.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:09 +00:00
Bilal Elmoussaoui
c5ea9562e1 clutter/backend: Stop re-allocating font_options
There is no real need to re-create a new cairo_font_options_t now that
the API is internal. Instead, create the font_options once and just
update it attributes.

Actors already register for the emitted font-changed signal to re-create
a new PangoContext.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:08 +00:00
Bilal Elmoussaoui
17e7f9be51 clutter/backend: Remove unused font_name field
We already store the exact same thing in ClutterSettings.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:08 +00:00
Bilal Elmoussaoui
3153708e85 clutter/backend: Initialize default font options if no schema found
When the `org.gnome.desktop.interface` schema is not found, currently
we were not initializing the font_options which means we needed to
handle that on the backend side. Instead, generate the font_options at
that moment.

As the settings are loaded the moment we assign a backend to the
settings `_clutter_settings_set_backend` which is called just after the
backend is constructed which is too early for any actor to use it for
creating a PangoContext, so the change is safe.

Also, as the font_options getter is only used in ClutterActor when
creating the PangoContext, drop the getter. As we might just store that
info somewhere else in the future.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:07 +00:00
Bilal Elmoussaoui
727d923f12 clutter/settings: Simplify cairo_font_options creation further
Currently, we were first reading the settings, creating a FontSettings
struct and then mapping the string associated on that struct back to
their corresponding cairo type. A lot of dancing for not much benefits.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:06 +00:00
Bilal Elmoussaoui
f4d97bb53f clutter/backend: Mark [get|set]_font_options as private
The cairo_font_options is only meant to be consumed by ClutterActor when
creating a PangoContext and as those APIs are never used externally,
mark them private to not expose more cairo APIs.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:06 +00:00
Bilal Elmoussaoui
53fd1e43f1 shaped-texture: Add missing cairo include
Would be needed with next commit.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:05 +00:00
Bilal Elmoussaoui
86fff39aa4 clutter/settings: Remove unused field
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:05 +00:00
Bilal Elmoussaoui
222ac59dc7 clutter/settings: Remove unused unscaled-font-dpi property
Nothing ever sets or use it, so remove it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:04 +00:00
Bilal Elmoussaoui
b559e5a14d clutter/settings: Drop xft font properties
As those properties are never set externally and just end up mapping the
gsettings values, in order to create a cairo_font_options_t.

Instead, simplify the whole thing and just create the
cairo_font_options_t from the resulting FontSettings.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4106>
2024-12-28 12:15:04 +00:00
Bilal Elmoussaoui
6c22b7faba cogl: Drop Rendererer.set_driver
As nothing uses it anymore. End users can still use the COGL_DRIVER variable
to force selecting a specific driver if needed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4194>
2024-12-27 13:25:40 +00:00
Bilal Elmoussaoui
ae48cf76f9 cogl/glx: Stop loading opengl module twice
As the Renderer takes care of doing that already as we enforce that the
DriverId is GL3 inside the glx winsys connection phase.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4194>
2024-12-27 13:25:40 +00:00
Bilal Elmoussaoui
d3fec7648d cogl/renderer: Simplify driver constraints logic
By just using the DriverId to get all the necessary details where
needed.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4194>
2024-12-27 13:25:40 +00:00
Bilal Elmoussaoui
7d376dfddc clutter: Drop CLUTTER_DRIVER env variable
We already have a COGL_DRIVER that allows selecting a specific
CoglDriverId.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4194>
2024-12-27 13:25:40 +00:00
Bartłomiej Piotrowski
d2b726ebf7 ci: Switch to GNOME GitLab mirror of ci-templates
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4199>
2024-12-27 10:17:39 +01:00
Bilal Elmoussaoui
623c6c6cd3 clutter: Make debug helpers functions introspected
Fixes: e06592d3d ("util: Drop duplicated Clutter debug flags helpers")
Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8118

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4197>
2024-12-23 14:16:42 +01:00
Michel Dänzer
23f3c17f0c kms/impl-device: Use deadline timer for all updates
Not with VRR though, because the deadline timer fires at most every 33ms
then.

Previously, the deadline timer was used only for cursor-only updates.
Using it for other updates means they pick up the latest cursor position
available at the deadline, resulting in the lowest possible input→output
latency for cursor movement.

TTBOMK this unlocks the full potential of the KMS thread given the
current atomic KMS API.

v2:
* Don't call meta_kms_update_merge_from with twice the same update
  pointer.
v3:
* Don't arm deadline timer if crtc_frame->pending_page_flip is true.
v4:
* Tweak want_deadline_timer indentation per check-code-style CI job.
v5:
* Also check crtc_frame->await_flush for want_deadline_timer.
v6:
* Tweak coding style to keep lines shorter. (Jonas Ådahl)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3964>
2024-12-23 09:29:07 +00:00
Michel Dänzer
315dfaa5d4 kms/impl-device: Simplify meta_kms_impl_device_schedule_process logic
There's no need for a label.

No functional change intended.

v2:
* Keep early returns separate. (Jonas Ådahl)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3964>
2024-12-23 09:29:07 +00:00
Michel Dänzer
0d7752a07d kms/impl-device: Move error handling into ensure_deadline_timer_armed
No functional change intended.

v2:
* Fix coding style per CI.
v3:
* Fix ensure_deadline_timer_armed parameter indentation. (Jonas Ådahl)

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3964>
2024-12-23 09:29:07 +00:00
Michel Dänzer
3353962c38 kms/impl-device: Move up ensure_deadline_timer_armed definition
Preparation for next commit, no functional change intended.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3964>
2024-12-23 09:29:07 +00:00
Michel Dänzer
37d1a20644 kms/impl-device: Use discard_update for pending_update as well
Previously it was just dropped on the floor with no feedback, which
could result in the main thread waiting for something which never
happens.

Fixes: 0d9fd1ead7a7 ("kms/impl-device: Destroy submitted update in disarm_all_deadline_timers")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3964>
2024-12-23 09:29:07 +00:00
Michel Dänzer
f8e8dad0f4 kms/impl-device: Refactor discard_update helper
No functional change intended.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3964>
2024-12-23 09:29:07 +00:00
Michel Dänzer
f8524159cc onscreen/native: Move discarded KMS update handling
To swap_buffer_result_feedback from page_flip_feedback_discarded. The
former is where META_KMS_ERROR_DISCARDED from disarm_all_frame_sources
gets handled here.

Fixes: af250506fbe8 ("kms/impl-device: Queue result when discarding submitted update")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3964>
2024-12-23 09:29:07 +00:00
Scrambled 777
dbb412647e Update Hindi translation 2024-12-22 14:06:48 +00:00
Bilal Elmoussaoui
4ef475d3fe cogl/xlib-renderer: Merge renderer winsys data
Currently, we cast the CoglXlibRenderer pointer into a CoglX11Renderer
which is something that we would get rid of later on, along with the
usage of a data field once the Renderers become a subtypes of
CoglRenderer.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4187>
2024-12-18 15:39:03 +00:00
Philip Withnall
9a7a5007a0 ci: Bump CI image to use gsettings-desktop-schemas 48.alpha
This contains the new screen time limits schema
(https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/merge_requests/87)
which will shortly be needed by gnome-shell.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4189>
2024-12-18 14:45:57 +00:00
Bilal Elmoussaoui
1e65e1106f cogl: Drop COGL_X11_SYNC env variable
We already have a MUTTER_SYNC one. No need for doing the same thing twice.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4186>
2024-12-13 14:42:23 +01:00
Bilal Elmoussaoui
903b943875 cogl/xlib-renderer: Stop keeping track of the list of renderers
As we can only have one renderer, if the connect phase fails, we would
dispose it
and there is no reason to manually register/unregister them.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4186>
2024-12-13 14:41:47 +01:00
Bilal Elmoussaoui
c913a33d6a cogl: Stop storing XDisplay on the Renderer
Instead, only store it in the XlibRenderer data and drop the code
related to connecting to XDisplay as MetaX11Display handles that
already.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4186>
2024-12-13 14:40:49 +01:00
Bilal Elmoussaoui
07fa87907e cogl: Drop no longer used Indices.new_for_buffer
And drop the offset field with it as nothing sets it anymore.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4184>
2024-12-13 13:09:48 +01:00
Jonas Ådahl
aad237a04a renderer/native: Don't close DMA buf fds before handing them forward
We closed all the DMA buffer fds after creating the DMA buffer backed
CoglFramebuffer, which meant that the fds we passed to CoglDmaBufHandle
were already closed. This broke screen casting with DMA buffers.

Fixes: 8509b74532 ("Make DMA buffer allocation format and modifier aware")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4177>
2024-12-12 15:38:23 +00:00
Bilal Elmoussaoui
1fce76a0fb cogl/graphene: Simplify matrix_project_points helper
As it is always used for 3 components, drop n=2 and n=4 support.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4180>
2024-12-12 15:13:04 +00:00
Sebastian Wick
42ba494f07 backend/native: Remove meta_backend_native_get_launcher
We can go through MetaBackend to the launcher now and this commit
changes the last user over to it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4130>
2024-12-12 15:30:36 +01:00
Sebastian Wick
a4db61d3e4 backend/native: Remove meta_backend_native_get_seat_id
The last user of it was udev but it now goes through the launcher so we
can remove it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4130>
2024-12-12 15:30:36 +01:00
Sebastian Wick
6d3d718684 backend: Remove useless skip annotation
Those functions are declared in the meta-backend-private.h file which is
not introspected.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4130>
2024-12-12 15:30:36 +01:00
Sebastian Wick
e68728f151 udev: Create udev in MetaBackend
So we can use it for backlight control in both the native and X11
backends.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4130>
2024-12-12 15:30:35 +01:00
Sebastian Wick
387a6e82e5 build: Only add gudev_dep/libudev_dep once
We already add them if have_libgudev is true, and for native builds it
always is true.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4130>
2024-12-12 15:27:11 +01:00
Sebastian Wick
15d4123bd1 udev: Move from backends/native/ to backends/
This makes it possible to use udev even for backends which are not
native. Specifically we want to start controling backlights in mutter
which has to happen for both native and X11.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4130>
2024-12-12 15:27:11 +01:00
Sebastian Wick
11b4de08c4 udev/native: Remove dependencies on the native backend
The generic backend now provides the launcher which is the last native
specific dependency. This makes it possible to move the udev component
to the generic backend.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4130>
2024-12-12 15:27:11 +01:00
Sebastian Wick
10cbda69e6 backend: Add pause/resume vfuncs to MetaBackend
For now we only pause/resume the rendering in the base class but in the
next few commits, we'll move udev from native to generic and need to
pause/resume it as well.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4130>
2024-12-12 15:26:23 +01:00
Sebastian Wick
30c6104620 backend: Create MetaLauncher in backend and not in backend native
It also adds a vfunc so the MetaBackend subclasses can add more
constraints on what the launcher must support.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4130>
2024-12-12 15:14:39 +01:00