mirror of
https://github.com/yshui/picom.git
synced 2025-10-30 23:46:46 -04:00
renderer/command_builder: fix misaligned shadow and window
See the comment. Related: #1389 (partial fix) Changelog: BugFix: Fix misaligned shadow and window when they are scaled. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
c1b8fea1b6
commit
8bc48df063
2 changed files with 14 additions and 2 deletions
|
|
@ -173,6 +173,13 @@ static inline vec2 vec2_scale(vec2 a, vec2 scale) {
|
|||
};
|
||||
}
|
||||
|
||||
static inline vec2 vec2_reciprocal(vec2 a) {
|
||||
return (vec2){
|
||||
.x = 1.0 / a.x,
|
||||
.y = 1.0 / a.y,
|
||||
};
|
||||
}
|
||||
|
||||
/// Check if two boxes have a non-zero intersection area.
|
||||
static inline bool ibox_overlap(struct ibox a, struct ibox b) {
|
||||
if (a.size.width <= 0 || a.size.height <= 0 || b.size.width <= 0 || b.size.height <= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue