diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-17 17:31:54 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-17 17:31:54 +0200 |
commit | 3c4b110ae014972c4c2e7a6c9704cd1b6c79f6ef (patch) | |
tree | bfe2a84edd5d2ae0f0de942cd3f51f77efe74dfa /modules/text_server_fb | |
parent | fde8838316f3f73e91ddc4e203a9a2a6c0ac327b (diff) | |
parent | 21341ddaed0469baa8f24b4c2fae76275cce59e0 (diff) |
Merge pull request #67521 from nikitalita/speed_up_texture_pos
Speed up `find_texture_pos_for_glyph()`
Diffstat (limited to 'modules/text_server_fb')
-rw-r--r-- | modules/text_server_fb/text_server_fb.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/text_server_fb/text_server_fb.cpp b/modules/text_server_fb/text_server_fb.cpp index c00d992475..4a46e17868 100644 --- a/modules/text_server_fb/text_server_fb.cpp +++ b/modules/text_server_fb/text_server_fb.cpp @@ -233,12 +233,13 @@ _FORCE_INLINE_ TextServerFallback::FontTexturePosition TextServerFallback::find_ ret.y = 0x7fffffff; ret.x = 0; + const int *ct_offsets_ptr = ct.offsets.ptr(); for (int j = 0; j < ct.texture_w - mw; j++) { int max_y = 0; for (int k = j; k < j + mw; k++) { - int y = ct.offsets[k]; + int y = ct_offsets_ptr[k]; if (y > max_y) { max_y = y; } |