-
Notifications
You must be signed in to change notification settings - Fork 8
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
[WLR Scene] Add blur #33
Conversation
6e7ec09
to
f86ae3e
Compare
f86ae3e
to
ca66ef7
Compare
1017e66
to
de4ec10
Compare
f8a24c0
to
39756c6
Compare
39756c6
to
7634dbf
Compare
An optimized blur example in tinywl wouldn't really make it that tiny and simple anymore, so skipping that :) |
Understandable, but do you mind running me through what's required on the comp side for getting this to work in scene? I'm following it along but a summary may be helpful My thinking here is that one of the main goals of scene is for compositors to easily leverage our effects in very few LOC |
So the optimized blur is a new scene node that should be inserted between regular scene trees, which would be between bottom and workspace in sways use-case. The comp is responsible for resizing the node to the desired size, which in most use-cases would be the monitor's size and coordinates. The comp is also responsible for redrawing the optimized blur by marking it as “dirty”. Sway currently redraws the blur when any background or bottom layer surface commits. So actually implementing it in a fully fledged comp doesn't require that many LOC, but adding an example in TinyWL would require adding extra non-blur related code (the extra layers and a good way of showing off the optimized blur) |
Might want to merge this after 0.2? Would give us some more time to think of a better impl, especially if we get a #60 impl merged |
Sounds good to me! |
dcae54d
to
7d61581
Compare
@@ -152,6 +156,12 @@ struct wlr_scene_shadow { | |||
float blur_sigma; | |||
}; | |||
|
|||
/** A scene-graph node telling SceneFX to render the optimized blur */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should maybe write that it doesn't actually render anything onto the tree
both rectangles now seem part of the blurring, other windows are not though so just seems like a layer order thing! |
Fixes setting size of border and shadow nodes too early, leading to the optimized blur example not working with GTK4 toplevels.
Fixed by 698373b :D |
I'll let Will bump the version instead :)
Depends on #30
Also depends on #66 for the initial shadow_node impl which the blur_node should base off of. Could potentially also add a custom_node impl for both of those effect nodes?
Todo:
Make a seperate blur_node instead of forcing it onto a scene_buffer(Will be difficult to separate the discard transparent logic, so we should wait with this)Tesing: