Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-07-16 05:09:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-07-16 05:12:19 +0400
commit1ae11f71ff6f076ebc428dc949c5b2a0339aa1e4 (patch)
treedfe24749a400a55862d4f2287c6fe60f5d1fca48 /source/blender/blenfont/intern/blf_glyph.c
parentdfe1b9b7a727d5d4cf998a89153aad9f3f6fde55 (diff)
BLF: avoid float/int conversion drawing glyphs
also use UNLIKELY for error cases
Diffstat (limited to 'source/blender/blenfont/intern/blf_glyph.c')
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index 7c3cfa30e16..bfb42f69077 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -279,6 +279,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
}
g->advance = ((float)slot->advance.x) / 64.0f;
+ g->advance_i = (int)g->advance;
g->pos_x = (float)slot->bitmap_left;
g->pos_y = (float)slot->bitmap_top;
g->pitch = slot->bitmap.pitch;