mutter/cogl
Jonas Dreßler 72054332c5 cogl/clip-stack: Restore old matrices after drawing to stencil buffer
When using a region clip and something has a rectangle clip pushed, a
special drawing method for ClutterTexts (emit_vertex_buffer_geometry()
in cogl-pango-display-list.c) starts to fail and clipping issues with
long texts (because emit_vertex_buffer_geometry() is only used for texts
longer than 25 characters) start to appear. This specifically happened
in Looking Glass, where the StViewport of the ScrollView sets a
rectangle clips and the texts are usually longer than 25 characters.

This is caused by the changing of the perspective and modelview matrix
when drawing to the stencil buffer and started happening when
region-clipping was introduced with commit 8598b654. Even though the
changing of the matrices was done before that, too, the issue probably
didn't happen because `rect->can_be_scissor` was TRUE and no stencil
buffer clipping was used at all.

To fix this, temporarily save the old matrices, then set the new ones
and restore the old ones when we're done drawing to the stencil buffer.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/2246

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1096
2020-02-29 19:29:31 +00:00
..
cogl cogl/clip-stack: Restore old matrices after drawing to stencil buffer 2020-02-29 19:29:31 +00:00
cogl-pango cogl/pango: Remove deprecated API using implicit fb stack 2019-12-03 19:02:14 +00:00
cogl-path cogl/path: Remove API using deprecated Cogl API 2019-12-03 19:02:14 +00:00
test-fixtures cogl: Remove always-set COGL_FEATURE_ID_OFFSCREEN 2019-10-21 21:43:08 +00:00
tests cogl: Remove no-op cogl_shader_compile and cogl_shader_get_info_log 2020-02-12 21:55:44 +00:00
.gitignore cogl-framebuffer: Remove swap_throttled config 2018-12-06 14:29:34 +00:00
cogl-config.h.meson cogl: Add libsysprof capture based tracing 2019-05-31 11:55:56 -03:00
cogl-mutter-config.h.in cogl: Make cogl-config.h include check explicit 2018-11-06 17:17:36 +01:00
config-custom.h move everything into a cogl/ directory 2016-04-22 16:44:31 +02:00
meson.build Add Graphene dependency 2019-10-16 11:38:13 +00:00