mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 21:40:33 +00:00
LibGL: Leave render loop early if color mask empty
This commit is contained in:
parent
addbcd42d7
commit
c4de2bb5e5
Notes:
sideshowbarker
2024-07-18 05:30:10 +09:00
Author: https://github.com/sunverwerth Commit: https://github.com/SerenityOS/serenity/commit/c4de2bb5e55 Pull-request: https://github.com/SerenityOS/serenity/pull/9451 Reviewed-by: https://github.com/Quaker762 ✅ Reviewed-by: https://github.com/alimpfard
1 changed files with 4 additions and 0 deletions
|
@ -308,6 +308,10 @@ static void rasterize_triangle(const RasterizerOptions& options, Gfx::Bitmap& re
|
|||
continue;
|
||||
}
|
||||
|
||||
// We will not update the color buffer at all
|
||||
if (!options.color_mask)
|
||||
continue;
|
||||
|
||||
// Draw the pixels according to the previously generated mask
|
||||
auto coords = b0;
|
||||
for (int y = 0; y < RASTERIZER_BLOCK_SIZE; y++, coords += step_y) {
|
||||
|
|
Loading…
Reference in a new issue