1
0
Fork 0
Commit graph

2381 commits

Author SHA1 Message Date
Adam Jackson
35f21c5bc0 cogl: Stop using glAlphaFunc in big-GL
We're always running through the GLSL pipeline so the fixed-function
alpha test is never invoked. This change does not yet remove the
alpha-test feture bit from the context because this bit of uniform
handling is going to be simplified in a future commit.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/995
2020-01-16 18:38:20 +00:00
Adam Jackson
9f2662c7f8 cogl: Remove fixed-function handling for layer color
This can't matter anymore, glColor* doesn't get used when drawing
through a shader.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/995
2020-01-16 18:38:20 +00:00
Adam Jackson
71a2ba7a98 cogl: Remove fixed-function workaround for point sprite coordinates
https://gitlab.gnome.org/GNOME/mutter/merge_requests/995
2020-01-16 18:38:20 +00:00
Adam Jackson
3f2ad5a50a cogl: Remove builtin/texcoord attribute tracking bitmasks from CoglContext
These were only being set from the fixed-function pipeline.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/995
2020-01-16 18:38:20 +00:00
Adam Jackson
abd094d135 cogl: Remove stray references to gl*Pointer, which we're never calling
https://gitlab.gnome.org/GNOME/mutter/merge_requests/995
2020-01-16 18:38:20 +00:00
Adam Jackson
737763112e cogl: Remove unused CoglMatrixMode
https://gitlab.gnome.org/GNOME/mutter/merge_requests/995
2020-01-16 18:38:20 +00:00
Jonas Ådahl
6e5ac0b585 Use G_GNUC_FALLTHROUGH instead of comments
Get the same task done in a bit more C:y way.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/998
2020-01-09 17:58:29 +01:00
Adam Jackson
498264959a cogl: Add support for GL_ANGLE_pack_reverse_row_order
This is the GLES equivalent of GL_MESA_pack_invert.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/980
2019-12-18 16:01:51 -05:00
Adam Jackson
e32e20521d cogl: Update documentation for COGL_PRIVATE_FEATURE_ANY_GL
https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
9d5092cef5 cogl: Remove COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE
Only the backend cares about this at all, and it's always set.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
68d0c11d88 cogl: Remove COGL_PRIVATE_FEATURE_GL_EMBEDDED
Only the driver backend cares about this now, we can equivalently check
that the driver is COGL_DRIVER_GLES2.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
fdf830940b cogl: Remove COGL_PRIVATE_FEATURE_GL_WEB
https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
10daade1c0 cogl: Remove COGL_PRIVATE_FEATURE_GL_FIXED, track it in the driver
At this point only the gl driver is at all aware of the difference
between core and compat contexts. COGL_PRIVATE_FEATURE_GL_FIXED is also
now quite misnamed, since we're using the GLSL pipeline even for pre-GL3
contexts. Remove the private feature and handle the few remaining
differences by checking the driver class inside the gl driver.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
9a3a6dc212 cogl: Move GL-specific context setup/teardown into the driver
https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
f9599b64d0 cogl: Add context_{,de}init hooks to CoglDriverVtable
There's quite a bit of CoglContext that properly belongs to the driver.
Add some hooks to allow the context to create/destroy such state. We
don't have driver-private storage in the CoglContext yet, though we
probably should.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/973
2019-12-18 16:33:54 +00:00
Adam Jackson
d5a70c7669 cogl: Remove unneeded X11 includes from various headers
https://gitlab.gnome.org/GNOME/mutter/merge_requests/977
2019-12-18 16:06:35 +00:00
Adam Jackson
573ba108d9 cogl: Remove unused xlib state from CoglContext
https://gitlab.gnome.org/GNOME/mutter/merge_requests/977
2019-12-18 16:06:35 +00:00
Adam Jackson
9325bd9d8e cogl: Remove unneeded GLX includes from cogl-framebuffer-private.h
https://gitlab.gnome.org/GNOME/mutter/merge_requests/977
2019-12-18 16:06:35 +00:00
Adam Jackson
420fb28d3f cogl: Move GLX-related headers into winsys/
Makes it harder to accidentally include them from the core.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/977
2019-12-18 16:06:35 +00:00
Adam Jackson
5613f4f7f4 cogl: Remove unused explicit blend-enable controls
https://gitlab.gnome.org/GNOME/mutter/merge_requests/978
2019-12-18 15:58:52 +00:00
Daniel van Vugt
02db9ee577 cogl: Remove reference to nonexistent type CoglVertex2f
It is actually CoglVertexP2.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/979
2019-12-18 15:50:36 +00:00
Daniel van Vugt
4aab814c37 cogl: Upload clipping rectangles in parallel
That is as a single array in a single GL operation. Instead of doing
each one as a separate upload.

Closes: https://gitlab.gnome.org/GNOME/mutter/issues/971

https://gitlab.gnome.org/GNOME/mutter/merge_requests/969
2019-12-18 11:52:23 +08:00
Daniel van Vugt
a48206e827 cogl: Simplify add_stencil_clip_region coordinates
https://gitlab.gnome.org/GNOME/mutter/merge_requests/969
2019-12-18 11:46:58 +08:00
Daniel van Vugt
99cc435730 cogl: Add function cogl_2d_primitives_immediate
For use in batching multiple primitives as a single GL upload.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/969
2019-12-18 11:46:54 +08:00
Jonas Ådahl
40205d8f1b cogl: Make pipeline creation introspectable
This means CoglContext is now also introspected, although its
constructor and some getters are skipped to avoid having to expose even
more types. This makes it possible to create pipelines using Javascript.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
4ede6ea8c5 cogl: Remove the framebuffer and source stacks
They have been deprecated for a long time, and all their uses in clutter
and mutter has been removed. This also removes some no longer needed
legacy state tracking, as they were only ever excercised in certain
circumstances when there was sources (pipelines or materials) on the now
removed source stack.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
77b3c0d670 cogl: Remove API implicitly switching between built in pipelines
This means cogl_set_source_color*() that switches to the opaque or
blending pipeline, or cogl_source_set_texture() which switches to the
texture pipeline.

Left is the opaque pipeline, as it is still used to compare other
pipelines to check whether they are opaque or not, and as the default
pipeline still pushed to the source stack during initialization.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
3819291cb7 cogl: Remove API implicitly using framebuffer stack
E.g. cogl_frustum(), cogl_push_matrix(), etc.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
30964051fe cogl: Remove declaration for long gone function
It was removed in 2011, but the declaration lingered. Until now.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
ae4ae61a5f cogl: Remove deprecated primitives functions
Such as cogl_rectangle() and cogl_polygon().

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
a91138c8f8 cogl/context: Remove unusued window_buffer field
It kept track of the last "window" (i.e. CoglOnscreen) was the active
on. It was used by API removed in the past, so also remove the left over
field.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
27b6d1892f cogl/path: Remove API using deprecated Cogl API
The implicit stacks are going away, so remove API that depend on it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
2a8f0c2801 cogl/tests: Port away from legacy implicit stack based API
Use the new API where state (framebuffer, pipeline) is always passed as
parameters, instead of using the implicit material and framebuffer
stack.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
9e2e44c0c2 cogl/tests/warp-modes: Test CoglPrimitive instead of cogl_polygon()
Change the warp modes test to sanity check CoglPrimitive based polygon
drawing instead of cogl_polygon(). This removes some checks, as
cogl_polygon() has explicitly documented special behaviour for automatic
wrap modes, which CoglPrimitive does not.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
5e117b3f5a cogl/tests: Remove testing of legacy API
Some tests just test that deprecated API still work as they should.
Those APIs are being removed, so prepare by removing their tests.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
294b4eda4c cogl/tests/backface-culling: Port to non-deprecated API
Usage of cogl_polygon() was ported to CoglPrimitive, and implicit
framebuffer stack API was ported to explicit framebuffer based API.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
7faf9f91db cogl/tests/backface-culling: Stop testing legacy state
It's going away, so stop testing it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
4b5abdc988 cogl/tests: Remove test-materials
It wasn't compiled, nor ported to the new test suite, and tests
deprecated functionality that are being removed. Lets drop it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
e696f639ab cogl/pixel-buffer: Remove declaration hidden behind #if
Doesn't lead to anywhere, isn't used anywhere, so lets remove it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +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
Jonas Ådahl
e8e5ccf82d cogl/tests: Remove test-fixed
It was a non-built non-ported test case for removed code.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
98c0fe934b cogl: Remove CoglVertexBuffer
It was deprecated, relied on deprecated API (implicit framebuffers,
mateiarls etc), and was unused. Lets remove it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Jonas Ådahl
49c8d42317 clutter: Introduce paint contexts
When painting, actors rely on semi global state tracked by the state to
get various things needed for painting, such as the current draw
framebuffer. Having state hidden in such ways can be very deceiving as
it's hard to follow changes spread out, and adding more and more state
that should be tracked during a paint gets annoying as they will not
change in isolation but one by one in their own places. To do this
better, introduce a paint context that is passed along in paint calls
that contains the necessary state needed during painting.

The paint context implements a framebuffer stack just as Cogl works,
which is currently needed for offscreen rendering used by clutter.

The same context is passed around for paint nodes, contents and effects
as well.

In this commit, the context is only introduced, but not used. It aims to
replace the Cogl framebuffer stack, and will allow actors to know what
view it is currently painted on.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/935
2019-12-03 19:02:14 +00:00
Carlos Garnacho
a586f6a152 cogl: Drop unused struct field
We only ever stored that the current clip uses the stencil buffer, but
never read it back. It doesn't seem like we'll have an use for it.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/867
2019-11-22 21:07:05 +00:00
Carlos Garnacho
a1116bc6c8 cogl: Add support for clipping regions
This uses the stencil buffer to poke holes in the shape of the
given cairo_region_t that we will draw through.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/867
2019-11-22 21:07:05 +00:00
Robert Mader
8e172aeecb cleanup: Use g_clear_handle_id() for g_source_remove()
It makes sure we do not forget to zero the id and lets us avoid
zero checks before. We use it for all new code, lets clean up the
existing code base.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/947
2019-11-22 01:27:40 +01:00
Robert Mader
92375c75f8 cleanup: Use g_clear_signal_handler() where possible
This is inspired by 98892391d7 where the usage of
`g_signal_handler_disconnect()` without resetting the corresponding
handler id later resulted in a bug. Using `g_clear_signal_handler()`
makes sure we avoid similar bugs and is almost always the better
alternative. We use it for new code, let's clean up the old code to
also use it.

A further benefit is that it can get called even if the passed id is
0, allowing us to remove a lot of now unnessecary checks, and the fact
that `g_clear_signal_handler()` checks for the right type size, forcing us
to clean up all places where we used `guint` instead of `gulong`.

No functional changes intended here and all changes should be trivial,
thus bundled in one big commit.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/940
2019-11-21 15:02:27 +00:00
Adam Jackson
22d1febf3c cogl: Remove unused CoglShaderLanguage
There is only GLSL.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/819
2019-11-20 12:15:49 -05:00
Adam Jackson
5aa971b177 cogl: Collapse some COGL_PIPELINE_{VERT,FRAG,PROG}END arrays
There is only GLSL now.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/819
2019-11-20 12:15:49 -05:00
Adam Jackson
e922c640ef cogl: Remove unused CoglPipelineFragend::passthrough
https://gitlab.gnome.org/GNOME/mutter/merge_requests/819
2019-11-20 12:15:49 -05:00