diff options
| author | Adam Harrison <adamdharrison@gmail.com> | 2021-06-08 21:31:09 -0400 |
|---|---|---|
| committer | Adam Harrison <adamdharrison@gmail.com> | 2021-06-08 21:31:09 -0400 |
| commit | 29837d0c410ac81500c3c87edc01fbc24914ca57 (patch) | |
| tree | 56fd7225fadc0ac2858e194d559efdab2e7f2f75 /src | |
| parent | 7de1fde9cfd7b68288d7510751d91adca71fb1c2 (diff) | |
| download | lite-xl-29837d0c410ac81500c3c87edc01fbc24914ca57.tar.gz lite-xl-29837d0c410ac81500c3c87edc01fbc24914ca57.zip | |
Replaced fill loop with SDL_FillRect.
Diffstat (limited to 'src')
| -rw-r--r-- | src/renderer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/renderer.c b/src/renderer.c index b08c25d9..9be08588 100644 --- a/src/renderer.c +++ b/src/renderer.c @@ -309,7 +309,8 @@ void ren_draw_rect(RenRect rect, RenColor color) { int dr = surface->w - (x2 - x1); if (color.a == 0xff) { - rect_draw_loop(color); + SDL_Rect rect = { x1, y1, x2 - x1, y2 - y1 }; + SDL_FillRect(surface, &rect, 255 << 24 | color.r << 16 | color.g << 8 | color.r); } else { rect_draw_loop(blend_pixel(*d, color)); } |
