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

Function TextLayoutSimpleTextSingleLine

snap_drawing/src/benchmark/main.cpp:26–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26static void TextLayoutSimpleTextSingleLine(benchmark::State& state) {
27 doBenchmark(state, [&](const auto& fontManager) {
28 auto font = fontManager->getDefaultFont().moveValue();
29
30 TextLayoutBuilder builder(
31 TextAlignLeft, TextOverflowEllipsis, Size::make(5000, 5000), 1, fontManager, false, 1.0f);
32
33 builder.append("Hello World!", font, TextLayoutLineHeight::multiple(1.0f), 0.0f, TextDecorationNone);
34
35 benchmark::DoNotOptimize(builder.build());
36 });
37}
38
39static void TextLayoutLongTextSingleLine(benchmark::State& state) {

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