From 1ac8491396f27d6e4c6333a062fec9b5ac26dd5f Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Sat, 3 Feb 2018 03:44:49 +0100 Subject: [PATCH] DrawConsole: use deferred bitmap drawing to speed up text rendering --- src/internal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/internal.c b/src/internal.c index 4cf351b..a0af514 100644 --- a/src/internal.c +++ b/src/internal.c @@ -112,6 +112,7 @@ SYMBOL_INTERNAL void DrawConsole(struct Game* game) { int clipX, clipY, clipWidth, clipHeight; al_get_clipping_rectangle(&clipX, &clipY, &clipWidth, &clipHeight); al_use_transform(&trans); + al_hold_bitmap_drawing(true); int width = (al_get_display_width(game->display) / game->viewport.width) * game->viewport.width; if (!game->viewport.integer_scaling) { @@ -139,6 +140,7 @@ SYMBOL_INTERNAL void DrawConsole(struct Game* game) { DrawTimelines(game); } + al_hold_bitmap_drawing(false); double game_time = al_get_time(); if (game_time - game->_priv.fps_count.old_time >= 1.0) {