sw_engine: hotfix range broken

hotfix for release. need to review the logic again
This commit is contained in:
Hermet Park 2024-11-08 00:46:07 +09:00
parent 2b32c24712
commit 9b9a0308c8

View file

@ -271,19 +271,11 @@ static void _dropShadowShift(uint32_t* dst, uint32_t* src, int stride, SwBBox& r
auto translucent = (direct || opacity < 255);
//shift offset
if (region.min.x + offset.x < 0) {
src -= offset.x;
} else {
dst += offset.x;
w -= offset.x;
}
if (region.min.x + offset.x < 0) src -= offset.x;
else dst += offset.x;
if (region.min.y + offset.y < 0) {
src -= (offset.y * stride);
} else {
dst += (offset.y * stride);
h -= offset.y;
}
if (region.min.y + offset.y < 0) src -= (offset.y * stride);
else dst += (offset.y * stride);
for (auto y = 0; y < h; ++y) {
if (translucent) rasterTranslucentPixel32(dst, src, w, opacity);