-
-
Notifications
You must be signed in to change notification settings - Fork 584
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
[RFC] New backend interface #1191
Labels
Milestone
Comments
yshui
added a commit
that referenced
this issue
Apr 2, 2024
Signed-off-by: Yuxuan Shui <[email protected]>
yshui
added a commit
that referenced
this issue
Apr 2, 2024
yshui
added a commit
that referenced
this issue
Apr 9, 2024
Signed-off-by: Yuxuan Shui <[email protected]>
yshui
added a commit
that referenced
this issue
Apr 9, 2024
Signed-off-by: Yuxuan Shui <[email protected]>
yshui
added a commit
that referenced
this issue
Apr 9, 2024
Signed-off-by: Yuxuan Shui <[email protected]>
yshui
added a commit
that referenced
this issue
Apr 10, 2024
Signed-off-by: Yuxuan Shui <[email protected]>
yshui
added a commit
that referenced
this issue
Apr 10, 2024
Signed-off-by: Yuxuan Shui <[email protected]>
yshui
added a commit
that referenced
this issue
Apr 10, 2024
Signed-off-by: Yuxuan Shui <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
Current backend interface has some short comings. Here is some examples:
clone_image
, or it can choose to only increment a reference count there, and only do the actual copy inimage_op
. And implement it as a reference count increase complexity and indirection.shadow_from_mask
andblur
as separate interfaces while they are basically doing the same thing behind the scenes.Proposal
To address this, I want to propose a new set of interfaces:
New image ops
We extend the
image_op
interface to include these new operations:blur
. Blur a region of the target image. Arguments: a region, and a blur context.compose
. Compose a second image onto the target image. Arguments: a compose context, an offset, and a source image. See below for the definition of compose context. Offset sets where the top-left corner of the source image is, in the coordinate system of the target image.Remove indirection in image structure
To support
clone_image
efficiently, existing picom backends all use reference counting. Andclone_image
is there to support attaching different sets image properties to the same underlying image. This is cumbersome, esp. considering we set image properties repeatedly, once per frame.Instead, we drop the concept of image properties, and instead use a compose context. The compose context changes how an image is composed onto the target image. It contains the following information:
We setup the compose context each time we need to compose a window on to the backbuffer.
The compose operation with the compose context can also be used to:
Support creating empty images
This is needed for things like
shadow_from_mask
,make_mask
, and for when we actually need to create a copy of an image. It would look something like this:The text was updated successfully, but these errors were encountered: