d4bea60e1a
Use cogl_framebuffer_read_pixels_into_bitmap () instead of glReadPixels () for the CPU copy path in multi-GPU support. The cogl function employs several tricks to make the read-pixels as fast as possible and does the y-flip as necessary. This should make the copy more performant over all kinds of hardware. This is expected to be used on virtual outputs (e.g. DisplayLink USB docks and monitors) foremost, where the dumb buffer memory is just regular system memory. If the dumb buffer memory is somehow slow, like residing in discrete VRAM or having an unexpected caching mode, it may be possible for the cogl function perform worse because it might do the y-flip in-place in the dumb buffer. Hopefully that does not happen in any practical scenario. Calling meta_renderer_native_gles3_read_pixels () here was conceptually wrong to begin with because it was done with the Cogl GL context of the primary GPU, not on the GL ES 3 context of a secondary GPU. However, due eglBindAPI being a no-op in Mesa and the glReadPixels () arguments being compatible, it worked. This patch adds a pixel format conversion table between DRM and Cogl formats. It contains more formats than absolutely necessary and the texture components field which is currently unused for completeness. See Mutter issue #323. Making the table more complete documents better how the pixel formats actually map so that posterity should be less likely to be confused. This table could be shared with shm_buffer_get_cogl_pixel_format () as well, but not with meta_wayland_dma_buf_buffer_attach (). On HP ProBook 4520s laptop (Mesa DRI Intel(R) Ironlake Mobile, Mesa 18.0.5), without this patch copy_shared_framebuffer_cpu () for a DisplayLink output takes 5 seconds with a 1080p frame. Obviously that makes Mutter and gnome-shell completely unusable. With this patch, that function takes 13-18 ms which makes it usable if not fluent. On Intel i7-4790 (Mesa DRI Intel(R) Haswell Desktop) machine, this patch makes no significant difference (the copy takes 4-5 ms). |
||
---|---|---|
.gitlab-ci | ||
clutter | ||
cogl | ||
data | ||
doc | ||
po | ||
src | ||
tools | ||
.gitignore | ||
.gitlab-ci.yml | ||
autogen.sh | ||
config.h.meson | ||
configure.ac | ||
COPYING | ||
Makefile.am | ||
meson_options.txt | ||
meson.build | ||
mutter.doap | ||
NEWS | ||
README.md |
Mutter
Mutter is a Wayland display server and X11 window manager and compositor library.
When used as a Wayland display server, it runs on top of KMS and libinput. It implements the compositor side of the Wayland core protocol as well as various protocol extensions. It also has functionality related to running X11 applications using Xwayland.
When used on top of Xorg it acts as a X11 window manager and compositing manager.
It contains functionality related to, among other things, window management, window compositing, focus tracking, workspace management, keybindings and monitor configuration.
Internally it uses a fork of Cogl, a hardware acceleration abstraction library used to simplify usage of OpenGL pipelines, as well as a fork af Clutter, a scene graph and user interface toolkit.
Mutter is used by, for example, GNOME Shell, the GNOME core user interface, and by Gala, elementary OS's window manager. It can also be run standalone, using the command "mutter", but just running plain mutter is only intended for debugging purposes.
License
Mutter is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for detalis.