Commit Graph

9 Commits

Author SHA1 Message Date
Yuxuan Shui 84407099a9
backend: give backends more flexibility regarding shadow creation
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-26 05:42:51 +01:00
Yuxuan Shui 9e8373e3e0
backend: add mask parameter to blur
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-25 02:59:01 +01:00
Yuxuan Shui 9b419504e8
backend: add the make_mask interface
This is used to create image masks that can be used to mask out
`compose` regions. For example, this can be used to mask out window body
so shadow won't be painted on them.

This could be more efficient than using rectangular regions for masking,
when there are a large number of rectangles; or more flexible, in the
case of window with rounded corners.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2022-08-24 08:39:21 +01:00
Yuxuan Shui 2a60836a9b
backend: split image_op into image_op and set_image_property
Currently there is some inconsistency in how image_op is implemented
across backends. The glx backend applies some of the image operations
lazily, and not always in the order the operations were made; while the
xrender backend applies the operations eagerly. This can lead to
different render result in some cases.

Instead of trying to preserving the order of operations, which would be
unnecessary, we re-model the API to better reflect the implementation.
We make it clear that setting the property doesn't change the image
data, and properties are only applied during composition and in a
specific order.

This makes sure the render result looks consistent across backends.
Should also improve the performance of the xrender backend, even if only
slightly.

Also distill out the property management code so they can be shared.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-06-20 06:49:38 +01:00
Yuxuan Shui 21dfe20794
backend: rename copy -> clone_image
This feels more appropriate as this operation doesn't necessarily copy
data.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2021-06-14 01:58:30 +01:00
Yuxuan Shui 73ea5d2bfb
backend: dummy: add more sanity checks
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-09-23 21:19:28 +01:00
Yuxuan Shui 0ba7761bd5
Untangle headers
Thanks, clang -fmodules.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-08-10 00:56:26 +01:00
Yuxuan Shui c719804fb1
backend: dummy: initialize backend_base properly
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-08-09 23:33:01 +01:00
Yuxuan Shui 8eb9d07fa8
Add dummy backend
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-08-04 17:52:45 +01:00