Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
SkShaperJSONWriter.h
Go to the documentation of this file.
1/*
2 * Copyright 2019 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SkShaperJSONWriter_DEFINED
9#define SkShaperJSONWriter_DEFINED
10
14
15#include <cstdint>
16#include <functional>
17#include <string>
18#include <vector>
19
20class SkJSONWriter;
21template <typename T> class SkSpan;
22
24public:
25 SkShaperJSONWriter(SkJSONWriter* JSONWriter, const char* utf8, size_t size);
26
27 void beginLine() override;
28 void runInfo(const RunInfo& info) override;
29 void commitRunInfo() override;
30
31 Buffer runBuffer(const RunInfo& info) override;
32
33 void commitRunBuffer(const RunInfo& info) override;
34
35 void commitLine() override {}
36
38 std::function<void(size_t, size_t, uint32_t, uint32_t)>;
39
40 // Break up cluster into a set of ranges for the UTF8, and the glyphIDs.
41 static void BreakupClusters(size_t utf8Begin, size_t utf8End,
43 const BreakupClustersCallback& processMToN);
44
45
48
49 // Gather runs of 1:1 into larger runs, and display M:N as single entries.
50 static void VisualizeClusters(const char utf8[],
51 size_t utf8Begin, size_t utf8End,
54 const VisualizeClustersCallback& processMToN);
55
56private:
57 void displayMToN(size_t codePointCount,
60
61 SkJSONWriter* fJSONWriter;
62 std::vector<SkGlyphID> fGlyphs;
63 std::vector<SkPoint> fPositions;
64 std::vector<uint32_t> fClusters;
65
66 std::string fUTF8;
67};
68
69#endif // SkShaperJSONWriter_DEFINED
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
void commitRunInfo() override
std::function< void(size_t, SkSpan< const char >, SkSpan< const SkGlyphID >)> VisualizeClustersCallback
SkShaperJSONWriter(SkJSONWriter *JSONWriter, const char *utf8, size_t size)
static void BreakupClusters(size_t utf8Begin, size_t utf8End, SkSpan< const uint32_t > clusters, const BreakupClustersCallback &processMToN)
void commitRunBuffer(const RunInfo &info) override
void runInfo(const RunInfo &info) override
std::function< void(size_t, size_t, uint32_t, uint32_t)> BreakupClustersCallback
void beginLine() override
void commitLine() override
Buffer runBuffer(const RunInfo &info) override
static void VisualizeClusters(const char utf8[], size_t utf8Begin, size_t utf8End, SkSpan< const SkGlyphID > glyphIDs, SkSpan< const uint32_t > clusters, const VisualizeClustersCallback &processMToN)
Dart_NativeFunction function
Definition: fuchsia.cc:51
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
Definition: switches.h:259