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-01-20 05:43:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-20 05:45:38 +0400
commit7436a3f4ce2069b7036cc56901f09270686bc0a5 (patch)
treeb3bdf921189bf9fde4dabcb8cbdf51ab08805417 /source/blender/editors/interface/view2d.c
parent60c53a5bdeff85a3abb72d2df84c44858637db5a (diff)
Correction for recent commit clearing font cache
- move cache reset into view2d and comment about the rationale for resetting cache there. - missed other places where view2d zoom level can change (smoothview, borderzoom, home and file reload) - comment about DPI wasn't correct.
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r--source/blender/editors/interface/view2d.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 544d9a0f575..aadb1b30f5b 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -985,6 +985,15 @@ bool UI_view2d_tab_set(View2D *v2d, int tab)
return changed;
}
+void UI_view2d_zoom_cache_reset(void)
+{
+ /* While scaling we can accumulate fonts at many sizes (~20 or so).
+ * Not an issue with embedded font, but can use over 500Mb with i18n ones! See [#38244]. */
+
+ /* note: only some views draw text, we could check for this case to avoid clearning cache */
+ BLF_cache_clear();
+}
+
/* *********************************************************************** */
/* View Matrix Setup */