mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 13:52:57 +00:00
[host] d12: enlarge downsampler damage rects
This commit is contained in:
parent
4463ca15f6
commit
e247f1fc7b
1 changed files with 6 additions and 0 deletions
|
@ -398,6 +398,12 @@ static void d12_effect_downsampleAdjustDamage(D12Effect * effect,
|
|||
rect->right = min(this->width , rect->left + width);
|
||||
rect->top = max(0, floor((double)rect->top * this->scaleY));
|
||||
rect->bottom = min(this->height, rect->top + height);
|
||||
|
||||
// enlarge the rect to avoid missing damage due to sampler rounding
|
||||
if (rect->left > 0 ) rect->left -= 1;
|
||||
if (rect->top > 0 ) rect->top -= 1;
|
||||
if (rect->right < this->width ) rect->right += 1;
|
||||
if (rect->bottom < this->height) rect->bottom += 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue