1
0
Fork 0
Commit graph

3075 commits

Author SHA1 Message Date
Sebastian Wick
e122943bcd cogl/gl: Check GLSL version and unify GL context version checks
This adds a check which makes sure that the required GLSL/GLSL ES
versions are supported.

It also splits out the GLES version check into its own function, just
like GL does.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3907>
2024-08-05 17:57:11 +00:00
Sebastian Wick
74917e1b07 cogl/gl: Use g_auto (GStrv) and g_autofree in more cases
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3907>
2024-08-05 17:57:11 +00:00
Bilal Elmoussaoui
5277e33d37 cogl: Remove no longer used OnscreenTemplate
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3915>
2024-08-05 15:47:29 +00:00
Bilal Elmoussaoui
3b386ba5d7 cogl: Remove no longer used FramebufferConfig
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3915>
2024-08-05 15:47:29 +00:00
Bilal Elmoussaoui
833070ab79 cogl: Remove need_stencil config
As it is always set to TRUE

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3915>
2024-08-05 15:47:29 +00:00
Bilal Elmoussaoui
41ec1aa0ca cogl: Remove use_stereo_stage config
Nothing sets it from the X11 backend API, so just get rid of it

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3915>
2024-08-05 15:47:29 +00:00
Bilal Elmoussaoui
a1828e7212 cogl: Remove samples_per_pixel config
It is only set through an undocumented env variable

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3915>
2024-08-05 15:47:29 +00:00
Bilal Elmoussaoui
b9269abaf5 cogl: Remove unused Error types
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
e43d9d7e75 cogl/indices: Add a IndicesType.get_size
To de-duplicate that code

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
609f7e3fe1 cogl: Remove unused OnScreenTemplate.set_samples_per_pixel
Not sure if we want to keep that env variable around

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
a71ad8e861 cogl/list: Remove unused API
Ideally, I think we might have to replace CoglList usage
as the over-complicated macros makes it hard to parse

But that is a task for another day

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
2d25b114e6 cogl/buffer: Use set_data helper
That ignores the error param, which is the behaviour
we always had. Changing that to propagate the error
would make the API ugly, so it is fine to remove?

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
beb9ecdbc4 cogl: Remove no longer useful Since annotation
Spotted in previous commit

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
a05caa6338 cogl/texture2d: Rename from_egl_image constructor
Similar to the from_egl_image_external one, to give it the correct
namespace

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
a9ec604eba cogl/renderer: Expose handle_event
As it was originally the function to be used before
making it private and providing safer wrappers around it for x11/win32.

Nowadays, it is only used in x11 and only internally in mutter, exposing
a 'safer' variant costs us exposing more of x11 renderer APIs without
much benefits.

With this change, the only internal xlib renderer we need from meta is
set_foreign_display which can't be easily worked around

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
b07c772fc8 cogl: Rename Shader/Program constructors
Otherwise they end up as global functions instead of constructors
of their corresponding types. Helps with better docs

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
716f23c7c1 cogl/pixel-format: Make CAN_HAVE_PREMULT an inlined function
To avoid exposing the function macro in the gir file & so the docs

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
162b8e1a15 cogl: Remove no longer useful UNAVAILABLE macro
It is no longer a separate library

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
5d7c4bccd8 cogl: Make BlendStringError private
It is a private API

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
4bd974222e cogl: Make RendererConstraint private
It is only used internally

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
50fc438599 cogl: Replace OnscreenDirtyInfo with MtkRectangle
It is a rectangle after all and is only used internally, so instead of
making it private just replace it

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
6b0a289d77 cogl: Make FramebufferDriverConfig private
There is 0 reason to expose that, it is a private API

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
b3404816fb cogl: Switch remaining headers to pragma once
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
6c1739ea1c cogl: Move get_graphics_status to Context
That is where it belongs & avoids a global function in the docs
when it shouldn't be one

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
97c43f9eec cogl/egl: Move get_egl_display to Context
Allows us to get rid of the extra header

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
e90d2e845e cogl/glib-source: Remove no longer useful API
It was only useful when Cogl was a separate library

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
5a6d2266e4 cogl/magazine: Remove unused free functions
The only magazine instance created is a static so nothing to be freed

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
47695daed1 cogl/xlib-renderer: Move struct where it is used
The extra header is too much for one struct

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
e57d3615bc cogl/xlib-renderer: Remove [add|remove]_filter
They end up calling the Renderer APIs & they are not used outside
of Cogl

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
0f405e9270 Rename remaining usages of material to pipeline
material is almost no longer used in the code base and the
few remaining references makes it confusing when looking at parts
of the codebase. So rename the rest as well.

Note that this renames a DeformEffect property and the only extension
making use of it doesn't use the property so i think it is okay to do
so without deprecating the old property for a few releases

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
a107cae976 cogl/atlas: Remove unused private function
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
5fde5abd3e cogl: Remove unnecessary compiler functions defines
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
7eadc948ae cogl: Inline various utilities
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
5f1ffb5304 cogl: Remove unused Primitive APIs
This also removes a clutter interactive test, but as those
tests don't serve that much any more for being no longer executed..

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3910>
2024-08-01 11:06:33 +00:00
Bilal Elmoussaoui
69d66eb82f cogl: Expose Atlas API
Needed to build cogl-pango out of tree

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3909>
2024-07-30 20:20:45 +00:00
Bilal Elmoussaoui
b035350ffd cogl: Replace RectangleMapEntry with MtkRectangle
Avoids exposing the former in the next commit even if MtkRectangle
uses signed integers compared to RectangleMapEntry. But as
those rectangles are defined inside of Cogl, it should be okay
I guess?

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3909>
2024-07-30 20:20:45 +00:00
Bilal Elmoussaoui
1f255be055 cogl: Properly export required functions by cogl-pango
Needed for moving cogl-pango out of tree

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3909>
2024-07-30 20:20:45 +00:00
Jonas Ådahl
3359b67686 clutter/color-state: Handle adding snippet to pipeline
While no functional changes right now, this allows us to add extra hooks
like adding uniforms.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3897>
2024-07-24 21:33:30 +00:00
Bilal Elmoussaoui
f78948a1de cogl: Remove unused List macros
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3901>
2024-07-24 21:18:10 +02:00
Bilal Elmoussaoui
90e0acf11a cogl/clip-stack: Remove unused primitive type
Detected by going through code coverage

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3901>
2024-07-24 21:18:10 +02:00
Bilal Elmoussaoui
c65bb3b9ce cogl: Remove poll renderer
As it is only composed of idle callbacks now, replace
those functions where they are used

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3887>
2024-07-24 14:33:29 +00:00
Bilal Elmoussaoui
24c338cc0e cogl: Simplify poll_renderer_get_info
As the only info we can pass now is whether we have any idle
closures. Removes the timeout handling which is now is always set to
either 0 or -1 based on whether we have idle closures

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3887>
2024-07-24 14:33:29 +00:00
Bilal Elmoussaoui
1ceb206897 cogl: Remove no longer used poll renderer API
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3887>
2024-07-24 14:33:29 +00:00
Bilal Elmoussaoui
1d0680471e cogl/renderer: Never try to enable X11 event retrieval
It is always disabled as we always set a foreign display
when creating the renderer.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3887>
2024-07-24 14:33:29 +00:00
Bilal Elmoussaoui
a7b87f250f cogl/renderer: Always try to use GLX_NV_robustness_video_memory_purge
It was always set to TRUE and mutter is the only user.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3887>
2024-07-24 14:33:29 +00:00
Bilal Elmoussaoui
fe60ee8b90 cogl: Replace custom static assertions with glib one
The displayed message is kept as a comment in the codebase
which is good enough

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3895>
2024-07-22 18:08:17 +02:00
Bilal Elmoussaoui
1acfa6def3 cogl: Move Color struct definition where it belongs
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3895>
2024-07-22 18:08:17 +02:00
Bilal Elmoussaoui
028df43012 cogl: Remove duplicated *_BIT defines
They are already defined in cogl-pixel-format header

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3895>
2024-07-22 17:36:10 +02:00
Bilal Elmoussaoui
138e5d4f54 cogl: Move TextureVertex to Clutter
The type is only used in ClutterDeformEffect, so move it there

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3895>
2024-07-22 17:36:10 +02:00
Bilal Elmoussaoui
fb3f239953 cogl/debug: Remove unused ignore-help parameter
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3895>
2024-07-22 13:06:33 +02:00