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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-09 20:37:31 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-09 20:55:10 +0300
commit427c75e4c20b38611d213ca26681a5691be5d6a6 (patch)
tree9bf3ee3f22e7329c62afd574800a7e4b976e8607 /source/blender/editors/interface/interface_icons.c
parent42b462ddd77cb73ad4f39152fc5213c43bbf2d37 (diff)
Cleanup: avoid some floating point divisions in drawing code
Diffstat (limited to 'source/blender/editors/interface/interface_icons.c')
-rw-r--r--source/blender/editors/interface/interface_icons.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index baa782dcb35..6bdbd3c4f1c 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -2240,12 +2240,12 @@ int UI_idcode_icon_get(const int idcode)
/* draws icon with dpi scale factor */
void UI_icon_draw(float x, float y, int icon_id)
{
- UI_icon_draw_ex(x, y, icon_id, 1.0f / UI_DPI_FAC, 1.0f, 0.0f, NULL, false);
+ UI_icon_draw_ex(x, y, icon_id, U.inv_dpi_fac, 1.0f, 0.0f, NULL, false);
}
void UI_icon_draw_alpha(float x, float y, int icon_id, float alpha)
{
- UI_icon_draw_ex(x, y, icon_id, 1.0f / UI_DPI_FAC, alpha, 0.0f, NULL, false);
+ UI_icon_draw_ex(x, y, icon_id, U.inv_dpi_fac, alpha, 0.0f, NULL, false);
}
void UI_icon_draw_preview(float x, float y, int icon_id, float aspect, float alpha, int size)