Bilal Elmoussaoui
9097deb69d
cogl: Remove various Framebuffer functions
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3806 >
2024-06-14 12:12:33 +02:00
Bilal Elmoussaoui
2c996a1b16
build/cogl: Simplify debug c-args
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3806 >
2024-06-14 12:12:33 +02:00
Bilal Elmoussaoui
e79f460eb8
cogl: Remove FrameBuffer CoglObject leftover
...
Fixes: eb14da387
("cogl: Turn CoglFramebuffer, CoglOffscreen and
CoglOnscreen into GObjects")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3806 >
2024-06-14 12:12:33 +02:00
Marco Trevisan (Treviño)
03ef333937
cogl/context: Add test util function to get the GL/GLES driver vendor
...
Some tests sadly behaves differently depending on the driver in use.
While this shouldn't happen we can't block on these driver issues, so
add a test utils private function to get the driver information so that
we can adapt test behavior depending on this.
This will allow to disable / enable tests at runtime instead of failing
in all the implementations, which is still better for catching
regressions in the parts we may be ignoring otherwise.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793 >
2024-06-13 21:21:49 +00:00
Bilal Elmoussaoui
3e363a5421
cogl/pipeline-debug: Use Color helper to get a string representation
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544 >
2024-06-13 21:19:54 +02:00
Bilal Elmoussaoui
93ded65b7d
cogl: Make sure alpha is correctly set for hsla Colors
...
As the color is initiallized with init_from_hls which always sets
alpha to 1.0
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544 >
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
5851738db4
cogl: Stop hardcoding Color size
...
Especially that the fields are public now and with a potential
migration to floats.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544 >
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
5f22fddc26
cogl: Make Color fields public
...
To simplify the porting to CoglColor in the future as ClutterColor
fields are public
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544 >
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
a12e707324
cogl: Implement transform from/to string for CoglColor values
...
Same as previous commits
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544 >
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
28f702ce1a
cogl: Copy ColorParamSpec from clutter
...
Follow up of previous commit
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544 >
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
ac3aa35489
cogl: Add missing functions from ClutterColor to CoglColor
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544 >
2024-06-13 14:45:53 +02:00
Bilal Elmoussaoui
014ea91a9d
cogl: Remove various DepthState functions
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3804 >
2024-06-12 00:42:45 +00:00
Bilal Elmoussaoui
bb29fa68fe
cogl: Remove AtlasTexture.new_from_data
...
Nothing uses it, allows to drop the corresponding test case as well
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3804 >
2024-06-12 00:42:45 +00:00
Bilal Elmoussaoui
94c2c41b66
cogl: Remove unused features functions
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3804 >
2024-06-12 00:42:45 +00:00
Bilal Elmoussaoui
ed0ee25843
cogl: Remove header-only Pipeline functions
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3804 >
2024-06-12 00:42:45 +00:00
Bilal Elmoussaoui
863d4ad6d6
cogl: Remove various unused MatrixEntry functions
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3804 >
2024-06-12 00:42:45 +00:00
Bilal Elmoussaoui
adf0acbe0d
cogl: Remove various unused Attribute functions
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3804 >
2024-06-12 00:42:45 +00:00
Georges Basile Stavracas Neto
bc7134cab3
cogl: Remove CoglOutput
...
Begone!
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3792 >
2024-06-03 08:31:58 +00:00
Georges Basile Stavracas Neto
cb4190616f
cogl/xlib-renderer: Use SubpixelFormat enums directly
...
No need to convert from / to CoglSubpixelFormat.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3792 >
2024-06-03 08:31:58 +00:00
Georges Basile Stavracas Neto
4f3631eae4
cogl/xlib-renderer: Don't override subpixel order
...
This function goes to great lengths to convert an Xlib SubpixelFormat
enum into a CoglSubpixelFormat, then immediately discards that.
Fixes 88d8bd84f2
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3792 >
2024-06-03 08:31:58 +00:00
Georges Basile Stavracas Neto
2a9576c59c
cogl/xlib-renderer: Plug some leaks
...
Found them while reworking this file. XRRFree*Info() fully free the
pointers inside the infos, they're more appropriate.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3792 >
2024-06-03 08:31:58 +00:00
Georges Basile Stavracas Neto
64d0e503ff
cogl/xlib-renderer: Copy CoglOutput struct
...
Since CoglOutput is strictly only used internally by Xlib and GLX,
copy it in place and use it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3792 >
2024-06-03 08:31:58 +00:00
Georges Basile Stavracas Neto
c9e22d9f79
cogl/xlib-renderer: Return refresh rate directly
...
Instead of a CoglOutput that is then only used to fetch the refresh
rate.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3792 >
2024-06-03 08:31:58 +00:00
Georges Basile Stavracas Neto
653ba4a7a7
cogl/renderer: Move output list to CoglXlibRenderer
...
It's the only place where it's used.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3792 >
2024-06-03 08:31:58 +00:00
Georges Basile Stavracas Neto
94d69c3252
cogl/onscreen-glx: Store refresh rate directly
...
Instead of the CoglOutput. This removes any necessity of refcounting,
and allows simplifying some code.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3792 >
2024-06-03 08:31:58 +00:00
Georges Basile Stavracas Neto
c1c8a4ba09
cogl/output: Make it private to Cogl
...
Don't expose its headers, remove all getters, and move the rest to
cogl-output-private.h. Next commits will clean it up even more, but
for now, just make it private.
This will help next commits remove CoglOutput.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3792 >
2024-06-03 08:31:58 +00:00
Georges Basile Stavracas Neto
3ba7f626ed
cogl: Remove unecessary includes
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3792 >
2024-06-03 08:31:58 +00:00
Marco Trevisan (Treviño)
bcec6df78e
cogl: Do not store the XVisualInfo
...
We were leaking one instance because _cogl_winsys_egl_context_created()
could be potentially be called twice (via cogl_display_setup() one as
part of cogl_renderer_check_onscreen_template() and the other when
called from clutter_backend_do_real_create_context()), and so we'd ended
up overwriting the reference we had.
However, we really didn't use it anywhere and once used to call the
relevant functions it's just useless.
So let's just keep it as local variable
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3788 >
2024-05-31 11:01:00 +00:00
Georges Basile Stavracas Neto
06dde49d12
cogl/renderer: Remove dead code
...
Introduced by dad9f64b5f
, but wasn't caught on review.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3782 >
2024-05-27 10:29:10 +02:00
Bilal Elmoussaoui
b054a09aa1
cogl: Remove unnused Renderer.foreach_output
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3781 >
2024-05-26 16:12:48 +02:00
Bilal Elmoussaoui
c506c194b6
cogl: Don't allow overriding renderer winsys_id
...
It is an API that no longer makes sense, as Cogl is only usable inside of Mutter
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3781 >
2024-05-26 16:11:47 +02:00
Bilal Elmoussaoui
dad9f64b5f
cogl: Don't allow overriding renderer constraints
...
It is an API that no longer makes sense, as Cogl is only usable inside of Mutter
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3781 >
2024-05-26 16:10:21 +02:00
Jonas Ådahl
c192f51159
cogl: Add sync fd feature enum value
...
This is meant to tell whether cogl_context_get_latest_sync_fd() is
supposed to work or not. It's enabled when ANDROID_native_fence_sync is
exposed by the driver.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3771 >
2024-05-23 16:42:21 +00:00
Bilal Elmoussaoui
5cac24346d
cogl: Remove unused DEFAULT_DRIVER code
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3762 >
2024-05-21 09:38:35 +00:00
Bilal Elmoussaoui
5752704886
cogl: Remove COGL_RENDERER env variable
...
Doesn't seem to be that useful with Cogl being embedded inside Mutter nowadays.
Spotted by Georges
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3762 >
2024-05-21 09:38:35 +00:00
Georges Basile Stavracas Neto
638d3355b4
cogl: Drop CoglSwapChain
...
CoglSwapChain is currently unused, and doesn't hold any information
nor is used for anything in particular.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3759 >
2024-05-20 11:45:31 +00:00
Bilal Elmoussaoui
fc623c1ed1
build: Enable -Werror=shadow and fix related issues
...
Mostly renames or removing already defined types
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3378 >
2024-05-06 15:54:16 +00:00
Michel Dänzer
09267d0bdd
cogl/onscreen: Add cogl_onscreen_egl_maybe_create_timestamp_query
...
Move the code out of cogl_onscreen_egl_swap_buffers_with_damage, and
call the new function from callers of the former.
v2:
* Use early return if the cogl context doesn't support timestamp
queries. (Sebastian Wick)
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3689 >
2024-04-10 11:17:23 +02:00
Michel Dänzer
0bbc25f694
cogl: Update latest sync fd from cogl_onscreen_swap_buffers_with_damage
...
Preparation for later changes, no functional change intended.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3689 >
2024-04-10 11:17:19 +02:00
Bilal Elmoussaoui
34d79b9ddf
cogl: Make sure generated enum header is built before sources using it
...
Fixes: 63a558950
("cogl: Generate a GType for PixelFormat")
Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/3413
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3690 >
2024-04-07 14:29:07 +00:00
Bilal Elmoussaoui
260a8d92dc
cogl: Use uint64_t for size params
...
As we are using a GParamSpecUint64 for that property
which makes it fail under 32bits platforms
Fixes: 6efd4a228
("cogl/cleanup: Use construct-only properties for
CoglBuffer")
Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/3408
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3683 >
2024-04-03 14:30:49 +00:00
Austin Shafer
99209958b9
cogl: Store latest GPU work completed sync fd
...
This keeps an internal sync_fd for the latest work submitted to
the GPU. This can then be fetched with cogl_context_get_latest_sync_fd
for use. This is intended for use with linux-drm-syncobj-v1
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3300 >
2024-03-28 13:27:42 -04:00
Robert Mader
683e917854
cogl/winsys: Remove eglGetProcAddress workaround for EGL < 1.5
...
`eglGetProcAddress()` used to not work for core API in EGL versions
below 1.5. The workaround in place in turn can fail - notably for setups
with a local Mesa build in /usr/local.
EGL 1.5 is almost 10 years old and similar workarounds don't seem to be
in place for toolkits we rely on, notably GTK4. Thus remove it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3655 >
2024-03-13 16:37:31 +01:00
Robert Mader
aaae07f9dd
onscreen/native: Mark GPU rendering duration as valid if supported
...
Since commit e30eb78891
`ClutterFrameClock` assumes that a valid CPU time
implies timestamp query support, which is also checked in
`cogl_onscreen_egl_swap_buffers_with_damage()`.
Unconditionally setting the CPU time on direct scanout meant that the
compositing path would be stuck on the last (direct scanout optimized)
result on GL implementations without timestamp query support since.
be0aa2976e
(clutter/frame-clock: Avoid rapidly toggling dynamic max render time)
Fix that by explicitly marking the gpu rendering duration as valid when
querying the GPU timestamps is supported and check for it ClutterFrameClock.
Fixes: 56580ea7c9
("backends/native: Assume zero rendering time for direct scanout buffers")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3655 >
2024-03-13 16:37:16 +01:00
Zander Brown
6a445d2eef
build: Make exported package in gir consistent
...
Additionally Cogl was missing xlib as an include
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1918 >
2024-03-13 12:52:41 +00:00
Corentin Noël
c4767b6c01
cogl: Increase annotation coverage
...
Upstream the annotations used in Gala, make more Cogl methods available since
things got moved to a GObject base and thus works natively with the introspection.
Add all the public API to the introspection.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3619 >
2024-02-27 14:45:29 +00:00
Bilal Elmoussaoui
60e10511ae
cogl: Remove Color.init_from_4ub
...
Slowly switching to using floats only in CoglColor
Helps https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3594 >
2024-02-22 12:34:58 +00:00
Bilal Elmoussaoui
cf0803ab71
cogl: Remove Color.get_*_byte
...
Helps with https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3544
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3594 >
2024-02-22 12:34:58 +00:00
Bilal Elmoussaoui
40dde833af
cogl: Remove Color.get_*_float
...
They are exactly the same as the get_* variants
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3594 >
2024-02-22 12:34:57 +00:00
Bilal Elmoussaoui
77f95d2203
cogl: Drop unused Color APIs
...
Simplifies the overall API as preparation of merging both
CoglColor and ClutterColor
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3594 >
2024-02-22 12:34:57 +00:00