Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mutter mutter
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,028
    • Issues 1,028
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 131
    • Merge requests 131
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • muttermutter
  • Merge requests
  • !189

Geometric (OpenGL-less) picking

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Daniel van Vugt requested to merge vanvugt/mutter:geometric-picking into master Aug 03, 2018
  • Overview 247
  • Commits 2
  • Pipelines 77
  • Changes 19

Redesign picking to avoid using OpenGL. Previously picking involved several GL operations per mouse movement, but now the GPU/GL isn't used at all.

By avoiding OpenGL and the graphics driver we also reduce CPU usage. Despite reimplementing the logic on the CPU, it still takes less CPU time than going through GL did.

This new approach also dramatically reduces the number of picking paint cycles required for cursor movement since the pickability of the entire screen is calculated and cached. The cache is only invalidated when the screen contents change so for typical desktop usage where the screen is mostly idle, cursor movement doesn't incur anywhere near as many paint cycles as it used to.

Even regular repaints are now noticeably faster because the GL pipeline isn't getting stalled by a call to glReadPixels.

CPU usage on an Intel i7-7700, tested with two different GPUs/drivers:

Intel Nvidia
Moving the mouse:
Before 10% 10%
After 6% 6%
Moving a window:
Before 23% 81%
After 19% 40%

Closes: #154 (closed) Closes: #691 (closed)

Helps significantly with: #283 (closed), #590 (closed), #700 (closed)

Edited Aug 22, 2019 by Daniel van Vugt
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: geometric-picking