mutter/src/ui
Rui Matos 1f20e82a96 ui/frames: Simplify client area control computation
Ungrabbed pointer motion events over a client window area don't even
reach mutter in X compositor mode, but as a wayland compositor we
process those events which ends up in a call stack like:

- meta_window_handle_ungrabbed_event
 - meta_ui_frame_handle_event
  - handle_motion_notify_event
   - get_control
    - meta_ui_frame_calc_geometry

Computing frame geometry is a relatively CPU expensive operation and
doing it on every motion event over a client window is pointless work
since we aren't going to change the cursor or prelight any frame
widget.

This commit special cases the determination of
META_FRAME_CONTROL_CLIENT_AREA using a much faster method. When
continuously moving the pointer over an X (client) window, it results
in a ~40% decrease in mutter cpu usage.

https://bugzilla.gnome.org/show_bug.cgi?id=779436
2017-03-02 19:40:27 +01:00
..
frames.c ui/frames: Simplify client area control computation 2017-03-02 19:40:27 +01:00
frames.h Always use the default screen 2016-07-23 10:55:02 +08:00
theme-private.h theme: Take invisible borders required by the theme into account 2016-02-04 15:16:26 +01:00
theme.c theme: set RTL/LTR flags on the style context 2016-04-09 10:03:27 -07:00
ui.c Always use the default screen 2016-07-23 10:55:02 +08:00
ui.h Always use the default screen 2016-07-23 10:55:02 +08:00