Commit Graph

24884 Commits

Author SHA1 Message Date
Adam Jackson
da36575d7f cogl: Remove always-set COGL_FEATURE_ID_PER_VERTEX_POINT_SIZE
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
7716a418ce cogl: Remove always-set COGL_PRIVATE_FEATURE_BLEND_CONSTANT
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
6ab2e30fff cogl: Remove unused COGL_FEATURE_ID_MIRRORED_REPEAT
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
8b0289a5ba cogl: Remove unused COGL_FEATURE_ID_DEPTH_RANGE
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
d810c0576d cogl: Move some GL function pointers from in-gles-core to core
Now that we require GLES2 or GL 2.1 these are always available.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
82f56054d4 cogl: Remove some completely unused GL function pointers
https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
de362537c6 cogl: VBOs are always available
ARB_vertex_buffer_object was promoted to core in GL 1.5 (and thus GLES
2.0).

https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +00:00
Adam Jackson
ba9fb16048 cogl: Remove COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES
Again, just a difference between GL and GLES for no real reason.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/866
2019-10-21 21:43:08 +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
Adam Jackson
c5bb2e3f56 cogl: Remove unused cogl_renderer_get_n_fragment_texture_units
https://gitlab.gnome.org/GNOME/mutter/merge_requests/874
2019-10-21 16:32:46 -04:00
Adam Jackson
049e7882b7 cogl: Move _cogl_bitmap_gl_{,un}bind into the GL driver
These are the only pieces of the cogl bitmap support that need GL driver
knowledge, so move them there like the TODO suggests.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/874
2019-10-21 16:32:46 -04:00
Adam Jackson
f297a5faa5 cogl: Remove unneeded driver/ includes from the core
https://gitlab.gnome.org/GNOME/mutter/merge_requests/874
2019-10-21 16:32:46 -04:00
Carlos Garnacho
40e6aa7d94 compositor: Plug cairo_region_t leak
The MetaBackgroundActor uses a region to find out the areas that need
repainting, but forgot to free it, oops.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/873
2019-10-21 19:01:37 +02:00
Carlos Garnacho
668be1f4bd backends: Plug MetaKmsPageFlipData leak
If the page flip is postponed, keep a ref to it, but still unref it
on the page flip callback anyways. Fix suggested by Jonas Ådahl.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/873
2019-10-21 19:01:35 +02:00
Jan Alexander Steffens (heftig)
a444a4c5f5 EGL: Include EGL/eglmesaext.h
The eglext.h shipped by libglvnd does not include the Mesa extensions,
unlike the header shipped in Mesa.

Fixes https://gitlab.gnome.org/GNOME/mutter/issues/876
2019-10-21 14:04:30 +00:00
Georges Basile Stavracas Neto
05da4a6094 clutter/effect: Remove pick flags
As pointed out, they are now unused. Remove
the pick flags.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/865
2019-10-21 13:49:26 +00:00
Georges Basile Stavracas Neto
db8fcc0537 clutter/actor: Remove pick code from paint
Now that they are properly split, remove the pick
code from paint paths.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/865
2019-10-21 13:49:26 +00:00
Georges Basile Stavracas Neto
86a5358812 clutter/stage: Pick with clutter_actor_pick()
Use the new function to perform picking.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/865
2019-10-21 13:49:26 +00:00
Georges Basile Stavracas Neto
ff8ed70f84 clutter/stage: Refactor view setup code
We'll share it between pick and paint, so refactor
the framebuffer and view setup code from paint
into a new function.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/865
2019-10-21 13:49:26 +00:00
Georges Basile Stavracas Neto
179d5ba6a6 clutter: Split pick and paint
Add the corresponding clutter_actor_pick() and
clutter_actor_continue_pick() as public APIs,
and use them in pick overrides and ClutterEffect.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/865
2019-10-21 13:49:26 +00:00
Robert Mader
98892391d7 wayland/surface: Reset buffer_destroy_handler_id
Syncronized subsurfaces that call into `merge_pending_state` might
otherwise not create new destroy handlers, ending up with a invalid
handler ids, throwing errors and leaking.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/868
2019-10-21 12:54:36 +00:00
Carlos Garnacho
45a8806e65 x11: Iterate over selections in a safer manner for event handling
It might be the case that handling an event induces the stream to
trigger completion, hence removing itself from the list. In that
case we would operate on the no longer valid list element to fetch
the next one.

Keep a pointer to the next element beforehand, so we can tiptoe
over streams that did remove themselves.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/869
2019-10-21 13:19:48 +02:00
Carlos Garnacho
e1fa0734a9 x11: Detach selection streams on dispose
The streams were only detached from MetaX11Display (and its event handling)
on completion. This is too much to expect, and those might be in some
circumstances replaced while operating.

Make those streams detach themselves on dispose(), so we don't trip into
freed memory later on when trying to dispatch unrelated X11 selection events.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/869
2019-10-21 11:47:40 +02:00
Cosimo Cecchi
8665084df1 monitor-manager: check for underscan setting validity upfront
Instead of doing a roundtrip to the X server before setting it, rely on
the previous value fetched before the configuration was sent over DBus.
This matches the argument check we already do elsewhere, and will allow
us to more easily add an additional condition to determine if underscan
is supported.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/673
2019-10-16 14:34:14 +00:00
Georges Basile Stavracas Neto
62072838c9 cogl: Remove midscene tracking
Midscene tracking was used at a time that some Cogl users
could call random OpenGL API without going through Cogl.
That is not allowed anymore, and certainly not done by
Mutter and GNOME Shell.

Remove midscene tracking from CoglFramebuffer.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/402
2019-10-16 16:25:08 +02:00
Georges Basile Stavracas Neto
c5b7d73ce2 cogl/journal: Track dither
For the exact same reason that previous commit added
viewport tracking, also add dither state tracking and
avoid flushing the journal even more.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/402
2019-10-16 16:25:08 +02:00
Georges Basile Stavracas Neto
0556138b9f cogl/journal: Track viewport
CoglJournal tracks a few OpenGL states so that they can
be batch-applied if necessary. It also has a nice property
of allowing purely CPU-based glReadPixels() when the scene
is composed of simple rectangles.

However, the current journal implementation leaves various
other GL states out, such as dithering and the viewport.
In Clutter, that causes the journal to be flushed when
picking, touching the GPU when we didn't really need to.

Track the viewport of the framebuffer in the journal so that
we can avoid flushing the journal so often.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/402
2019-10-16 16:25:08 +02:00
Jasper St. Pierre
d57dbe1d4c framebuffer: Fix clip tracking in the unclipped case
Leaving the clip bounds untouched means that it will retain the stale value
of whatever it was when we last had a clip; reset it so that it contains the
full framebuffer contents instead.

https://bugzilla.gnome.org/show_bug.cgi?id=712562
https://gitlab.gnome.org/GNOME/mutter/merge_requests/402
2019-10-16 16:25:08 +02:00
Georges Basile Stavracas Neto
5d646a5d6f cogl/framebuffer: Check buffer bits before modifying it
CoglFramebuffer checks the passed buffer bits in order to
detect when the fast path (that uses the journal) should
be used.

However, it also modifies one of the buffer bits that is
checked for the fast path, meaning we never actually hit
the fast path on cogl_framebuffer_cleaf4f().

Check the depth and color buffer bits before modifying them.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/402
2019-10-16 16:25:08 +02:00
Daniel van Vugt
e82a657cd9 clutter/actor: Remove color from the pick virtual function
It's unused since commit 14c706e51.

**ABI break**

https://gitlab.gnome.org/GNOME/mutter/merge_requests/851
2019-10-16 12:01:16 +00:00
Daniel van Vugt
8c89ea5f0a clutter/stage: Do picking with float coordinates
Previously picking was done on an int (x,y) to address a particular pixel.
While `int` was the minimum precision required, it was also an unnecessary
type conversion.

The callers (input events mainly) all provide float coordinates and the
internal picking calculations also have always used floats. So it was
inconsistent and unnecessary to drop to integer precision in between those.

ABI break: This changes the parameter types for public function
`clutter_stage_get_actor_at_pos`, but its documentation is already
sufficiently vague to not need changing.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/844
2019-10-16 11:52:04 +00:00
Georges Basile Stavracas Neto
8cfa8dc0c1 cogl/matrix-stack: Use graphene types on entries
This will help moving to graphene_matrix_t, since the convertions
between nodes and graphene types won't be necessary anymore.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:14 +00:00
Georges Basile Stavracas Neto
bdf5e3f357 Replace ClutterGeometry by graphene_rect_t
The last of the replacements. It is fine for now
to replace ClutterGeometry's integers by floats.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:14 +00:00
Georges Basile Stavracas Neto
94682e69aa Replace ClutterRect by graphene_rect_t
https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:14 +00:00
Georges Basile Stavracas Neto
160cc9182d Replace ClutterPoint by graphene_point_t
Remove the tests for ClutterPoint since it's
corresponding code moved to private ClutterStage
methods.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:14 +00:00
Georges Basile Stavracas Neto
cd293f764e Replace ClutterSize by graphene_size_t
https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:13 +00:00
Georges Basile Stavracas Neto
a5d0cfe8fb Replace ClutterVertex by graphene_point3d_t
Pretty direct and straightforward port. This requires a
GNOME Shell counterpart. In addition to that, include a
progress function.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:13 +00:00
Georges Basile Stavracas Neto
ba0f17f5b1 Replace CoglVector* by graphene_vec*_t
This is an extremely straightforward and minimalistic port of
CoglVector APIs to the corresponding Graphene APIs.

Make ClutterPlane use graphene_vec3_t internally too, for the
simplest purpose of keeping the patch focused.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:13 +00:00
Georges Basile Stavracas Neto
16875340cb Remove CoglQuaternion
This is unused API, and there are no plans to actually
use it. Even if we want to use it in the future, we'll
be fully Graphene and won't need this API anyway.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:13 +00:00
Georges Basile Stavracas Neto
959a418cc3 Replace CoglEuler by graphene_euler_t
As the first step into removing Cogl types that are covered by
Graphene, remove CoglEuler and replace it by graphene_euler_t.

This is a mostly straightforward replacement, except that the
naming conventions changed a bit. Cogl uses "heading" for the
Y axis, "pitch" for the X axis, and "roll" for the Z axis, and
graphene uses the axis themselves. That means the 1st and 2nd
arguments need to be swapped.

Also adapt the matrix stack to store a graphene_euler_t in the
rotation node -- that simplifies the code a bit as well.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:13 +00:00
Georges Basile Stavracas Neto
7c7ccb2e43 clutter: Pull in Clutter dependencies
Mutter requires Clutter, which requires Cogl. That means
Clutter requires all Cogl dependencies, and Mutter requires
all Clutter dependencies as well.

However, currently, Clutter does not pull in its dependencies,
which means we need to link against Cogl manually.

Add Clutter dependencies to declare_dependency() so that the
graphene dependency only needs to be declared once, for Cogl,
and pulled together.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:13 +00:00
Georges Basile Stavracas Neto
cada2b54fe Add Graphene dependency
Graphene is a small library with data types and APIs
specially crafted to computer graphics. It contains
performant implementations of matrices, vectors, points
and rotation tools. It is performance because, among
other reasons, it uses vectorized processor commands
to compute various operations.

Add Graphene dependency to Mutter.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:13 +00:00
Georges Basile Stavracas Neto
3ecae81809 clutter/tests: Rename variable
Graphene uses C99 and includes stdbool.h, which adds a
new 'bool' type. Clutter has an a11y test that names a
variable as 'bool' too, and they do not play well together.

Rename this variable to boolean.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:13 +00:00
Georges Basile Stavracas Neto
4f2b217a6a clutter/actor: Drop ClutterActor:clip property
This is a deprecated property that is not used anywhere
in the codebase. Not by GNOME Shell. Because it uses the
deprecated ClutterGeometry type, it's a good target for
cleaning up, given that ClutterGeometry will be dropped
later on.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:13 +00:00
Georges Basile Stavracas Neto
b1a1d4e13d Remove fog support
Fog is explicitly deprecated in favour of CoglSnippet API,
and in nowhere we are using this deprecated feature, which
means we can simply drop it without any sort of replacement.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/458
2019-10-16 11:38:13 +00:00
Jonas Ådahl
f7315c9a36 window-actor: Move shapes, shadows and unredirection to X11 sub types
Move out updating of various shapes (input, opaque, shape) indirectly
from X11 to the corresponding X11 sub types of MetaWindowActor and
MetaSurfaceActor.

Also move fullscreen window unredirection code with it. We want to
effectively do something similar for MetaCompositorServer, but it will
work differently enough not to share too much logic.

While it would have been nice to move things piece by piece, things were
too intertwined to make it feasible.

This has the side effect fixing accidentally and arbitrarily adding
server side shadow to Wayland surfaces.

Fixes: https://gitlab.gnome.org/GNOME/mutter/issues/727

https://gitlab.gnome.org/GNOME/mutter/merge_requests/734
2019-10-16 13:16:55 +02:00
Jonas Ådahl
9ac52f0340 compositor/x11: Move unredirect logic to helper
It makes it clearer what is required for unredirecting a window.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/734
2019-10-16 13:05:40 +02:00
Jonas Ådahl
f059466337 window-actor/x11: Use g_clear_signal_handler()
Also fixes type of handler ID.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/734
2019-10-16 13:05:40 +02:00
Jonas Ådahl
dcd0f4322a shaped-texture: Add API to check opaqueness
It is opaque if the texture has no alpha channel, or if the opaque
region covers the whole content.

Internally uses a function that checks whether there is an alpha
channel. This API will be exposed at a later time as well.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/734
2019-10-16 13:05:40 +02:00
Florian Müllner
65d8f27b6b doap: Update list of maintainers
Move historic entries from "maintainers" to "authors" and add more
fellow gnomies to better reflect reality.
2019-10-16 12:33:47 +02:00