BLF: Remove ASCII-only Code Paths

Remove redundant code for drawing text strings that contain only ASCII.

See D12293 for much more detail.

Differential Revision: https://developer.blender.org/D12293

Reviewed by Campbell Barton
This commit is contained in:
2021-08-25 13:30:00 -07:00
parent 518b97e674
commit 5b751c95f4
15 changed files with 36 additions and 147 deletions

View File

@@ -152,11 +152,9 @@ static void drw_text_cache_draw_ex(DRWTextStore *dt, ARegion *region)
BLF_position(
font_id, (float)(vos->sco[0] + vos->xoffs), (float)(vos->sco[1] + vos->yoffs), 2.0f);
((vos->flag & DRW_TEXT_CACHE_ASCII) ? BLF_draw_ascii : BLF_draw)(
font_id,
(vos->flag & DRW_TEXT_CACHE_STRING_PTR) ? *((const char **)vos->str) : vos->str,
vos->str_len);
BLF_draw(font_id,
(vos->flag & DRW_TEXT_CACHE_STRING_PTR) ? *((const char **)vos->str) : vos->str,
vos->str_len);
}
}
@@ -235,7 +233,7 @@ void DRW_text_edit_mesh_measure_stats(ARegion *region,
* etc.). See bug T36090.
*/
struct DRWTextStore *dt = DRW_text_cache_ensure();
const short txt_flag = DRW_TEXT_CACHE_GLOBALSPACE | (unit->system ? 0 : DRW_TEXT_CACHE_ASCII);
const short txt_flag = DRW_TEXT_CACHE_GLOBALSPACE;
Mesh *me = ob->data;
BMEditMesh *em = me->edit_mesh;
float v1[3], v2[3], v3[3], vmid[3], fvec[3];