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
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
f0ebc41205
cogl: Move cairo dependency to cogl-pango
...
As cairo is not used in cogl API
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3530 >
2024-01-27 10:03:15 +00:00
Sebastian Wick
41a7e8e3e0
build: Make g-ir-scanner warnings fatal when -werror is set
...
This should help catching problems with introspection in CI.
This also pulls out some common arguments to the gnome.generate_gir
call.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3528 >
2024-01-17 09:26:00 +00:00
Bilal Elmoussaoui
0f6df633fe
cogl/pango: Drop PANGO_ENABLE_BACKEND usage
...
Dropped before Pango 1.46 which is the min required version
so the backward compatibility is no longer needed
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3491 >
2024-01-05 14:22:22 +01:00
Bilal Elmoussaoui
3fcff05847
cogl/pango: Remove no longer needed version check
...
We require pango 1.46 nowadays
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3491 >
2024-01-05 14:22:22 +01:00
Bilal Elmoussaoui
f5dac3a5d9
build: One config file to rule them all
...
Group all the three config files from clutter/cogl/meta into one
and also remove unnused configurations and replace duplicated ones
This also fixes Cogl usage of HAS_X11/HAS_XLIB to match the expected
build options
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3368 >
2023-11-15 12:00:19 +00:00
Bilal Elmoussaoui
5fe3d13db5
cogl/pango: Drop no longer useful file
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3374 >
2023-11-09 15:16:16 +00:00
Bilal Elmoussaoui
c01ffdb8ba
cogl/gir: Depend explicitly on Mtk
...
As it is used now for MtkRegion types making the GIR file not containing
the relevant dependency and not being able to resolve MtkRegion type
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3292 >
2023-11-03 11:27:52 +00:00
Bilal Elmoussaoui
2c4968fb41
cogl: Port Primitive away from CoglObject
...
- The associated CoglAttribute's are now stored in GPtrArray as suggested
by carlosg in
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193?commit_id=19b619073b3c7d311c64e0a997558f943b38c94a#note_1849281
- cogl_primitive_set_attributes was dropped for "simplicity"
especially that nothing uses it.
- As this is the last remaining CoglObject subclass, the commit also drops
all the CoglObject related macros/types
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193 >
2023-10-29 21:16:24 +00:00
Bilal Elmoussaoui
9b9e12edb2
cogl: Port Node/Pipeline/PipelineLayer away from CoglObject
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193 >
2023-10-29 21:16:24 +00:00
Bilal Elmoussaoui
739c59fefc
cogl: Port Buffer* away from CoglObject
...
Make CoglBuffer an abstract class and inherit the various Cogl*Buffer types from it.
As none of the subclasses is overriding the vtable functions, they were not turned into
vfuncs but plain function pointers in CoglBuffer.
We still use _cogl_buffer_initialize until we port the various params into actual construct-only
properties, similar to the previous commit for CoglTexture.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193 >
2023-10-29 21:16:24 +00:00
Bilal Elmoussaoui
863163cc6e
cogl: Port Texture* away from CoglObject
...
- Make Texture a parent GObject class and move the vtable funcs as vfuncs
instead of an interface as we would like to have dispose free the TextureLoader.
- Make the various texture sub-types inherit from it.
- Make all the sub-types constructors return a CoglTexture instead of their respective
specific type. As most of the times, the used functions accept a CoglTexture,
like all the GTK widgets constructors returning GtkWidget.
- Fix up the basics of gi-docgen for all these types.
- Remove CoglPrimitiveTexture as it is useless: It is just a texture underhood.
- Remove CoglMetaTexture: for the exact same reason as above.
- Switch various memory management functions to use g_ variant instead of the cogl_ one
Note we would still want to get rid of the _cogl_texture_init which is something
for the next commit
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193 >
2023-10-29 21:16:24 +00:00
Bilal Elmoussaoui
4ea3593ebf
cogl: Port Atlas away from CoglObject
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193 >
2023-10-29 21:16:24 +00:00
Bilal Elmoussaoui
f0923aab44
cogl: Port Attribute away from CoglObject
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193 >
2023-10-29 21:16:24 +00:00
Bilal Elmoussaoui
1da42dc3c0
cogl: Port Context away from CoglObject
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193 >
2023-10-29 21:16:24 +00:00
Daniel van Vugt
025e5d5327
Remove unused *.pc.in
...
It seems *.pc are instead now entirely generated from meson.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3226 >
2023-08-31 09:47:50 +00:00
Niels De Graef
814a9de9d8
cogl: Chain up to dispose()
...
We forgot to chain up to the parent class' `dispose()` vfunc in both
`CoglPangoRenderer` and `CoglFrameBuffer`. Plugs 2 (probably tiny)
memory leaks.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3203 >
2023-08-22 21:55:17 +02:00
Bilal Elmoussaoui
d10533cc1c
cogl/pango: Fix wrong unref function
...
PangoRenderer is a GObject not a CoglObject
Noticed while working on
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3193
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3197 >
2023-08-21 15:55:18 +00:00
Bilal Elmoussaoui
f2f9e63568
build/gi: Set header & pkgconfig names
...
So that the docs generated by gi-docgen contains them
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3087 >
2023-08-12 19:34:20 +00:00
Bilal Elmoussaoui
a955f0e47c
cleanup: Make include macro usages consistent
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3157 >
2023-08-07 22:24:36 +00:00
Bilal Elmoussaoui
ead9a3024c
cleanup: Switch to pragma once
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3157 >
2023-08-07 22:24:36 +00:00
Bilal Elmoussaoui
b852bbba47
cleanup: Stop translating nick/blurb for pspecs
...
As those strings are intended to be used by some UI but nothing uses
that in reality except GStreamer.
So drop them similar to what GTK did at
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/4717
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3101 >
2023-07-19 11:33:59 +00:00
Jonas Ådahl
61b42e5303
build: Use / operator instead of join_paths everywhere
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2985 >
2023-05-04 12:35:38 +00:00
Carlos Garnacho
1a210218c9
build: Fix cogl-pango underlinking
...
This library is using Pango and PangoCairo. Make it declare them
as requirements.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2864 >
2023-03-03 20:17:01 +00:00
Bilal Elmoussaoui
bb5af3a6bd
g-i: Drop unneeded since/stability annotations
...
They are no longer useful since the merge of cogl inside mutter
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2708 >
2022-11-22 13:32:52 +01:00
Bilal Elmoussaoui
3393db942a
docs/cogl-pango: Make use of gi-docgen annotations
...
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2708 >
2022-11-22 13:32:43 +01:00
Fernando Monteiro
913458381f
cogl: Remove usages of framebuffer_draw_primitive
...
We were already returning cogl_primitive_draw in framebuffer_draw_primitive,
so replace all usages and remove it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2058 >
2021-12-07 15:32:21 +00:00
Robert Mader
df4508e8cf
cogl: Stop using GSlice
...
It has been inofficially deprecated for years, is known to cause issues
with valgrind and potentially hides memory corruption.
Lets stop using it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1512 >
2021-02-22 13:51:30 +01:00
Jonas Ådahl
aa99e505ad
cogl/framebuffer: Move public struct fields to private struct
...
This will limit accidental manipulation of the framebuffer struct
fields, while also paving the way to change to GObject type hierarchy.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1496
2020-10-16 16:17:38 +00:00
Marco Trevisan (Treviño)
645d596f9d
cogl: Use autopointers to free structs on return
...
This is a potential leak discovered by static analysis, in fact if
_COGL_GET_CONTEXT returns, the newly allocated struct isn't released.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1195
2020-04-12 21:40:20 +00:00
Carlos Garnacho
a5294ce55f
cogl: Remove CoglPath and the tesselator
...
This was barely used, and doesn't represent the way we want to
do 2D rendering.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1126
2020-04-08 11:38:48 +02:00
Carlos Garnacho
aa136f4515
cogl-pango: Special case alpha of 0 for color glyphs
...
Like ed10aea44d
, but for color glyphs. Since they do use the alpha
component from the given color.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1161
2020-03-29 12:53:39 +00:00
Carlos Garnacho
e8ea5ecd8a
cogl-pango: Factor in default color alpha again
...
In commit d846fabda
we moved to using the override color alpha, however
it was missed that the actor opacity is transferred to the PangoRenderer
through the default color alpha, and the reason it was used there.
We actually want to factor in both alpha values, in order to respect
both foreground color alpha and actor opacity. This is done on the
unpremultiplied color, so we just need to change the alpha value.
Fixes effects on text actors that involve actor opacity.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1158
2020-03-28 12:48:11 +01:00
Florian Müllner
ed10aea44d
cogl-pango: Special case alpha of 0
...
pango_renderer_get_alpha() returns 0 to indicate that the alpha value
should be inherited from the environment, but we are passing it on
(and therefore making the text fully translucent).
Instead, make the text fully opaque as expected.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1156
2020-03-28 01:04:17 +01:00
Carlos Garnacho
d846fabda2
cogl-pango: Forward alpha from correct color
...
Use the override color alpha, if set.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1155
2020-03-27 23:33:38 +01:00
Carlos Garnacho
2d94a34a14
cogl-pango: Honor foreground alpha PangoAttribute
...
Instead of hardcoding 0xff as alpha, forward this attribute.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1155
2020-03-27 23:33:35 +01:00
Jonas Ådahl
6885c37784
cogl: Mark exported cogl symbols using COGL_EXPORT
...
Just like libmutter-clutter, and libmutter, mark exported symbols with
an COGL_EXPORT macro. This removes the .map and .map.in files previously
used, containing a list of semi private symbols. This symbol was out of
date, i.e. pointed to non-existing symbols, and was also replaced with
COGL_EXPORT macros.
unit_test_* symbols are exported by the help of the unit test defining
macro. test_* symbols are no longer supported as it proved unnecessary.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1059
2020-03-26 09:05:38 +01:00
Carlos Garnacho
3aece84499
cogl-pango: Make color glyphs unaffected by foreground color
...
Making color glyphs affected by the foreground color makes them become
"tinted" on any other color than white. Make it sure we always paint
those white by checking the cached glyph value, the foreground color
will be reset on the next iteration through glyphs.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/850
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1148
2020-03-25 11:14:33 +00:00
Carlos Garnacho
40fb06ca17
cogl-pango: Cache whether glyphs are backed up by a color font
...
This will be necessary later on.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1148
2020-03-25 11:14:33 +00:00
Jonas Ådahl
66f02ae93d
cogl/pango: Remove deprecated API using implicit fb stack
...
Remove the implicit framebuffer stack using cogl_pango_render_*() API
that was replaced with the newer cogl_pango_show_*() API.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Adam Jackson
148cba3270
cogl: Remove COGL_PRIVATE_FEATURE_QUADS
...
There's no real performance benefit to this, it's just a difference
between GL and GLES for no reason.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:07 +00:00
Daniel van Vugt
73eaf51770
cogl-pango/meson.build: Remove extraneous quoting
...
It wasn't necessary (see other instances of -DG_LOG_DOMAIN) and somewhere
along the line it was getting turned into forward slashes becoming a syntax
error:
```
/usr/include/glib-2.0/gobject/gobject.h:767: syntax error, unexpected '/' in
...
g_assertion_message (/"CoglPango/",
```
https://gitlab.gnome.org/GNOME/mutter/merge_requests/841
2019-10-10 17:29:44 +08:00
Emmanuele Bassi
c17af6c794
Add fallback for semi-private symbols in Pango
...
Pango dropped the PANGO_ENABLE_BACKEND and PANGO_ENABLE_ENGINE symbols,
so we need to add our own defines to avoid breaking the build.
https://gitlab.gnome.org/GNOME/mutter/issues/667
2019-07-07 10:37:51 +01:00
Niels De Graef
70bacb9402
cogl: Remove CoglError wrapper
...
CoglError was added at a certain point to remove the hard dependency on
GLib, but since this can't be avoided inside mutter, let's remove this
whole abstraction.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/631
2019-06-20 18:25:04 +02:00
Niels De Graef
769a02b630
cogl: Drop _COGL_RETURN_VAL_IF_FAIL macro
...
This was introduced when the Cogl maintainers tried to move away from
GLib. Since we always require it, we can just use
`g_return_val_if_fail()` immediately.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/629
2019-06-19 21:46:22 +02:00
Niels De Graef
576330edce
cogl: Drop _COGL_RETURN_IF_FAIL macro
...
This was introduced when the Cogl maintainers tried to move away from
GLib. Since we always require it, we can just use `g_return_if_fail()`
immediately.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/629
2019-06-19 21:36:19 +02:00
Marco Trevisan (Treviño)
7a17e236f7
Use free_full on GSList's instead of foreach + free
...
GList's used in legacy code were free'd using a g_slist_foreach + g_slist_free,
while we can just use g_slist_free_full as per GLib 2.28.
So replace code where we were using this legacy codepath.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/576
2019-05-15 14:49:56 -05:00
Florian Müllner
a1e325f749
build: Don't use absolute paths with subdir keyword
...
Meson 0.50.0 made passing an absolute path to install_headers()'
subdir keyword a fatal error. This means we have to track both
relative (to includedir) paths for header subdirs and absolute
paths for generated headers now :-(
https://gitlab.gnome.org/GNOME/mutter/merge_requests/492
2019-03-18 12:37:14 +00:00