MCPcopy Create free account
hub / github.com/Snapchat/Valdi / TextLayoutLongTextMultiLine

Function TextLayoutLongTextMultiLine

snap_drawing/src/benchmark/main.cpp:55–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 benchmark::DoNotOptimize(builder.build());
54 });
55}
56
57static void TextLayoutLongTextMultiLine(benchmark::State& state) {
58 doBenchmark(state, [&](const auto& fontManager) {
59 auto font = fontManager->getDefaultFont().moveValue();
60
61 TextLayoutBuilder builder(
62 TextAlignLeft, TextOverflowEllipsis, Size::make(100, 5000), 0, fontManager, false, 1.0f);
63
64 builder.append("Hello World! This string might be pretty long, and because of that we will have to lay it out "
65 "on multiple lines",
66 font,
67 TextLayoutLineHeight::multiple(1.0f),
68 0.0f,
69 TextDecorationNone);
70
71 benchmark::DoNotOptimize(builder.build());
72 });
73}

Callers

nothing calls this directly

Calls 4

doBenchmarkFunction · 0.85
getDefaultFontMethod · 0.80
appendMethod · 0.65
buildMethod · 0.45

Tested by

no test coverage detected