gnome-shell/src/shell-workspace-background.h
Ivan Molodetskikh 83564e59b3 workspace: Port WorkspaceBackground allocate to C
WorkspaceBackground's allocate is a hot function called every frame
during overview animations. Port it to C.

While we're at it, cache the work area and the monitor geometry, which
do not need to be re-fetched on every allocation.

This reduces the average WorkspaceBackground allocation time from
0.134 ms to 0.017 ms. With four workspaces, scrolling the overview sees
an average WorkspacesView allocation time improvement from
1.104 ms to 0.678 ms.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2394>
2022-08-03 12:30:31 +00:00

15 lines
396 B
C

#ifndef __SHELL_WORKSPACE_BACKGROUND_H__
#define __SHELL_WORKSPACE_BACKGROUND_H__
#include <st/st.h>
G_BEGIN_DECLS
#define SHELL_TYPE_WORKSPACE_BACKGROUND (shell_workspace_background_get_type ())
G_DECLARE_FINAL_TYPE (ShellWorkspaceBackground, shell_workspace_background,
SHELL, WORKSPACE_BACKGROUND, StWidget)
G_END_DECLS
#endif /* __SHELL_WORKSPACE_BACKGROUND_H__ */