fontrenderer: mark used region, so that blitting works

This commit is contained in:
Stefan Seyfried
2012-04-01 12:59:00 +02:00
parent a029333c1a
commit f44dcf26a9

View File

@@ -387,6 +387,7 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u
int left=x; int left=x;
int step_y=height; int step_y=height;
int _y = y;
// ----------------------------------- box upper end (this is NOT a font metric, this is our method for y centering) // ----------------------------------- box upper end (this is NOT a font metric, this is our method for y centering)
// //
@@ -614,6 +615,8 @@ void Font::RenderString(int x, int y, const int width, const char *text, const u
} }
//printf("RenderStat: %d %d %d \n", renderer->cacheManager->num_nodes, renderer->cacheManager->num_bytes, renderer->cacheManager->max_bytes); //printf("RenderStat: %d %d %d \n", renderer->cacheManager->num_nodes, renderer->cacheManager->num_bytes, renderer->cacheManager->max_bytes);
pthread_mutex_unlock( &renderer->render_mutex ); pthread_mutex_unlock( &renderer->render_mutex );
int _h = (boxheight > height) ? boxheight : height;
frameBuffer->mark(left, _y - _h, left + width, _y);
} }
void Font::RenderString(int x, int y, const int width, const std::string & text, const unsigned char color, const int boxheight, const bool utf8_encoded) void Font::RenderString(int x, int y, const int width, const std::string & text, const unsigned char color, const int boxheight, const bool utf8_encoded)