1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

LibGfx: Simplify condition

This is just an XOR. No behaviour change.
This commit is contained in:
MacDue 2024-01-02 20:45:06 +00:00 committed by Andreas Kling
parent db51e80d50
commit b4eb66d9fe

View file

@ -322,11 +322,9 @@ void EdgeFlagPathRasterizer<SamplesPerPixel>::accumulate_non_zero_scanline(EdgeE
auto winding = m_windings[x].counts[y_sub];
auto previous_winding_count = sum_winding.counts[y_sub];
sum_winding.counts[y_sub] += winding;
// Toggle fill on change to/from zero
if ((previous_winding_count == 0 && sum_winding.counts[y_sub] != 0)
|| (sum_winding.counts[y_sub] == 0 && previous_winding_count != 0)) {
// Toggle fill on change to/from zero.
if (bool(previous_winding_count) ^ bool(sum_winding.counts[y_sub]))
sample ^= subpixel_bit;
}
}
}
}