mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
screen-cast/src: Add debug logging when creating buffers
Add some debug logging that allows checking whether we're using DMA buffers for screencasting or system memory buffers. This can be useful for debugging screencasting performance and CPU usage. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2256>
This commit is contained in:
parent
cb07e7a7d4
commit
38f3bf6ee2
@ -859,6 +859,10 @@ on_stream_add_buffer (void *data,
|
||||
|
||||
if (dmabuf_handle)
|
||||
{
|
||||
meta_topic (META_DEBUG_SCREEN_CAST,
|
||||
"Allocating DMA buffer for pw_stream %u",
|
||||
pw_stream_get_node_id (priv->pipewire_stream));
|
||||
|
||||
spa_data[0].type = SPA_DATA_DmaBuf;
|
||||
spa_data[0].flags = SPA_DATA_FLAG_READWRITE;
|
||||
spa_data[0].fd = cogl_dma_buf_handle_get_fd (dmabuf_handle);
|
||||
@ -878,6 +882,10 @@ on_stream_add_buffer (void *data,
|
||||
return;
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_SCREEN_CAST,
|
||||
"Allocating MemFd buffer for pw_stream %u",
|
||||
pw_stream_get_node_id (priv->pipewire_stream));
|
||||
|
||||
/* Fallback to a memfd buffer */
|
||||
spa_data[0].type = SPA_DATA_MemFd;
|
||||
spa_data[0].flags = SPA_DATA_FLAG_READWRITE;
|
||||
|
Loading…
Reference in New Issue
Block a user