Skip to content

Commit

Permalink
One time init
Browse files Browse the repository at this point in the history
  • Loading branch information
djowel committed Sep 8, 2020
1 parent d4fe13f commit fb63135
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/impl/skia/text_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ namespace cycfi::artist
, _text{ utf32 }
, _buff{ _text }
{
init_linebreak();
struct init_linebreak_
{
init_linebreak_() { init_linebreak(); }
};
static init_linebreak_ init;

_paint.setAntiAlias(true);
_paint.setStyle(SkPaint::kFill_Style);
Expand Down

0 comments on commit fb63135

Please sign in to comment.