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,019
    • Issues 1,019
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 136
    • Merge requests 136
  • 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
  • !409

Turn MetaShapedTexture into a ClutterContent implementation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Georges Basile Stavracas Neto requested to merge gbsneto/content into master Jan 23, 2019
  • Overview 110
  • Commits 9
  • Pipelines 52
  • Changes 19

MetaShapedTexture is the class responsible for drawing the contents of a client window, applying transformations and masks and etcetera. Right now, it is implemented as a ClutterActor subclass that also happens to semi-implement MetaCullable.

This MR turns MetaShapedTexture into a GObject subclass that implements ClutterContent, and is attached to MetaSurfaceActor.

Depends on: !405 (merged)

Performance

Turns out, there is a theoretical performance gain from this MR. Before, each window would have 1 + 2 * number of surfaces actors, which would generally mean 3: a MetaWindowActor, a MetaSurfaceActor, and a MetaShapedTexture. With ClutterContent, each window has 1 + number of surfaces, which generally means 2: a MetaWindowActor, a MetaSurfaceActor. So at the very least, it reduces the number of window actors by 33%.

If you consider subsurfaces, e.g. a window with an open popover, well, the picture starts to change: before that would mean 5 actors, now that's 3. I guess you can see where this is going.

"That is not a lot", one might say. But it turns out to be significant due to an easily ignored detail: all these windows are children of MetaWindowGroup. And MetaWindowGroup traverses the actor tree 3 times on each repaint.


To Do:

  • Figure out broken input coordinates
  • Measure impact on painting times
Edited Sep 02, 2019 by Georges Basile Stavracas Neto
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: gbsneto/content