20#define gUniqueGlyphIDs_Sentinel 0xFFFF
23 const uint16_t* curr =
start;
27 return static_cast<int>(curr -
start);
46 for (
int i = 0;
i < loops; ++
i) {
78#define kMaxHashBits 12
79#define kMaxHashCount (1 << kMaxHashBits)
88 int index = proc(array[
i]) & hashMask;
89 collisions +=
table[index];
106 if ((
false))
rotr(0, 0);
111 return "fontefficiency";
121 for (
int hashBits = 6; hashBits <= 12; hashBits += 1) {
122 int hashMask = ((1 << hashBits) - 1);
123 for (
int limit = 32; limit <= 1024; limit <<= 1) {
134 SkDebugf(
"hashBits [%d] limit [%d] collisions [%d / %d = %1.2g%%] using %s\n", hashBits, limit, collisions,
glyphs,
153 uint16_t fGlyphs[100];
155 const bool fOneAtATime;
159 fName.printf(
"font-path-%s", oneAtATime ?
"loop" :
"batch");
164 return fName.c_str();
168 return backend == Backend::kNonRendering;
180 for (
int loop = 0; loop < loops; ++loop) {
189 src->transform(mx,
static_cast<SkPath*
>(ctx));
static int count_glyphs(const uint16_t start[])
static int count_collisions(const uint16_t array[], int count, HasherProc proc, unsigned hashMask)
static void dump_array(const uint16_t array[], int count)
static uint32_t rotr(uint32_t value, unsigned bits)
uint32_t(* HasherProc)(uint32_t)
static const struct @223 gRec[]
static uint32_t hasher0(uint32_t value)
#define gUniqueGlyphIDs_Sentinel
sk_bzero(glyphs, sizeof(glyphs))
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
@ kGlyphID
uses two byte words to represent glyph indices
#define INHERITED(method,...)
const char * onGetName() override
void onDraw(int loops, SkCanvas *canvas) override
const char * onGetName() override
void onDraw(int loops, SkCanvas *canvas) override
FontPathBench(bool oneAtATime)
void onDraw(int loops, SkCanvas *canvas) override
const char * onGetName() override
bool isSuitableFor(Backend backend) override
void onDelayedSetup() override
bool getPath(SkGlyphID glyphID, SkPath *path) const
void setSize(SkScalar textSize)
void getPaths(const SkGlyphID glyphIDs[], int count, void(*glyphPathProc)(const SkPath *pathOrNull, const SkMatrix &mx, void *ctx), void *ctx) const
@ kAntiAlias
may have transparent pixels on glyph edges
static const uint16_t gUniqueGlyphIDs[]
static float min(float r, float g, float b)
static uint32_t Mix(uint32_t hash)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
font
Font Metadata and Metrics.