Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce new scene-graph API #1966

Open
wants to merge 1 commit into
base: master
from
Open

Conversation

@emersion
Copy link
Member

emersion commented Dec 25, 2019

A new wlr_scene API has been added, following the design ideas from 1.
The new API contains the minimal set of features required to make the
API useful. The goal is to design a solid fundation and add more
features in the future.

@emersion emersion force-pushed the emersion:scenegraph branch from 4601830 to 0ebf7b2 Dec 26, 2019
@emersion emersion changed the title [WIP] Introduce new scene-graph API Introduce new scene-graph API Dec 26, 2019
@emersion emersion marked this pull request as ready for review Dec 26, 2019
@emersion

This comment has been minimized.

Copy link
Member Author

emersion commented Dec 26, 2019

This is now ready for review. A compositor using wlr_scene is available here: https://lists.sr.ht/~sircmpwn/sedna/patches/9403

@ddevault

This comment has been minimized.

Copy link
Member

ddevault commented Dec 30, 2019

Initial impressions from testing with sedna:

Looks like there are sometimes issues with double buffering the main display framebuffer on the Wayland backend, it can start flickering under certain conditions. One way I was able to trigger it was by opening gnome-calculator, then running mpv on a largeish (1080p) video, then closing mpv.

#include <wlr/types/wlr_surface.h>
#include "util/signal.h"

static struct wlr_scene *scene_node_get_root(struct wlr_scene_node *node) {

This comment has been minimized.

Copy link
@ddevault

ddevault Dec 30, 2019

Member

nit: this reads like it'd walk up the node tree until it found the root node. Perhaps better to call it scene_from_root_node or something.

@ddevault

This comment has been minimized.

Copy link
Member

ddevault commented Dec 30, 2019

On the whole this looks fine, but I'm not convinced that it demonstrates much value yet. How would this translate into plane allocation? Is there a roadmap to libliftoff integration? Are we sure that if we ship this API it'll be reasonably easy to carry into this future?

@emersion

This comment has been minimized.

Copy link
Member Author

emersion commented Jan 1, 2020

Looks like there are sometimes issues with double buffering the main display framebuffer on the Wayland backend, it can start flickering under certain conditions. One way I was able to trigger it was by opening gnome-calculator, then running mpv on a largeish (1080p) video, then closing mpv.

Weird, there's no damage tracking going on and the rendering logic is the same. I'll try to reproduce and fix it.

On the whole this looks fine, but I'm not convinced that it demonstrates much value yet.

Yes, this is intended. I want to break down the work in separate pull requests.

How would this translate into plane allocation? Is there a roadmap to libliftoff integration?

This should be pretty straightforward. See glider for an example of how libliftoff could be wired up:

However, the plan is to have abstract libliftoff behind a wlroots API so that all backends can implement such optimizations. This would be orthogonal to wlr_scene: compositor can choose not to use wlr_scene if they want to use planes.

Are we sure that if we ship this API it'll be reasonably easy to carry into this future?

I'd be happy to keep this PR unmerged until I can demonstrate more features.

A new wlr_scene API has been added, following the design ideas from [1].
The new API contains the minimal set of features required to make the
API useful. The goal is to design a solid fundation and add more
features in the future.

[1]: #1826 (comment)
@emersion emersion force-pushed the emersion:scenegraph branch from 0ebf7b2 to 341861b Jan 13, 2020
@emersion

This comment has been minimized.

Copy link
Member Author

emersion commented Jan 13, 2020

Looks like there are sometimes issues with double buffering the main display framebuffer on the Wayland backend, it can start flickering under certain conditions. One way I was able to trigger it was by opening gnome-calculator, then running mpv on a largeish (1080p) video, then closing mpv.

Caused by the renderer scissor not properly unset when done. Should be fixed now.

@ddevault

This comment has been minimized.

Copy link
Member

ddevault commented Jan 13, 2020

Confirmed fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.