Do no add rencache a command for empty rectangles
This commit is contained in:
parent
cb08c5cbb7
commit
0f8d7f3202
|
@ -160,7 +160,9 @@ void rencache_set_clip_rect(RenRect rect) {
|
|||
|
||||
|
||||
void rencache_draw_rect(RenRect rect, RenColor color) {
|
||||
if (!rects_overlap(screen_rect, rect)) { return; }
|
||||
if (!rects_overlap(screen_rect, rect) || rect.width == 0 || rect.height == 0) {
|
||||
return;
|
||||
}
|
||||
Command *cmd = push_command(DRAW_RECT, COMMAND_BARE_SIZE);
|
||||
if (cmd) {
|
||||
cmd->rect = rect;
|
||||
|
|
Loading…
Reference in New Issue