diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-17 09:14:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-17 10:04:28 +0400 |
commit | 3e3efae7e9420817a6fe35545d97568a69e2ce7c (patch) | |
tree | b6702eea72f629be453795e317fbcc22c3692535 /source/blender/editors/include | |
parent | 1b9db9911d9cbcb81d58277084b9c4c5daf84e8a (diff) |
Viewport Text Drawing: replace single allocs with a memarena
- pass label strlen since in many cases its already known.
- use single linked list for cached text drawing.
- add BLI_link_utils.h for single linked list macros.
own tests give approx 22% overall speedup.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/UI_view2d.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h index 1208446e14d..b087469887b 100644 --- a/source/blender/editors/include/UI_view2d.h +++ b/source/blender/editors/include/UI_view2d.h @@ -210,8 +210,8 @@ void UI_view2d_offset(struct View2D *v2d, float xfac, float yfac); short UI_view2d_mouse_in_scrollers(const struct bContext *C, struct View2D *v2d, int x, int y); /* cached text drawing in v2d, to allow pixel-aligned draw as post process */ -void UI_view2d_text_cache_add(struct View2D *v2d, float x, float y, const char *str, const char col[4]); -void UI_view2d_text_cache_rectf(struct View2D *v2d, const struct rctf *rect, const char *str, const char col[4]); +void UI_view2d_text_cache_add(struct View2D *v2d, float x, float y, const char *str, size_t str_len, const char col[4]); +void UI_view2d_text_cache_rectf(struct View2D *v2d, const struct rctf *rect, const char *str, size_t str_len, const char col[4]); void UI_view2d_text_cache_draw(struct ARegion *ar); /* operators */ |