Home
last modified time | relevance | path

Searched refs:glyphCount (Results 1 - 25 of 92) sorted by relevance

1234

/third_party/skia/gm/
H A Dtextblobshader.cpp53 int glyphCount = fGlyphs.count(); variable
56 run = &builder.allocRun(font, glyphCount, 10, 10, nullptr);
57 memcpy(run->glyphs, fGlyphs.begin(), glyphCount * sizeof(uint16_t));
59 run = &builder.allocRunPosH(font, glyphCount, 80, nullptr);
60 memcpy(run->glyphs, fGlyphs.begin(), glyphCount * sizeof(uint16_t));
61 for (int i = 0; i < glyphCount; ++i) {
65 run = &builder.allocRunPos(font, glyphCount, nullptr);
66 memcpy(run->glyphs, fGlyphs.begin(), glyphCount * sizeof(uint16_t));
67 for (int i = 0; i < glyphCount; ++i) {
69 run->pos[i * 2 + 1] = 150 + 5 * sinf((float)i * 8 / glyphCount);
[all...]
H A Dtexteffects.cpp54 const int glyphCount = font.countText(text, textLen, SkTextEncoding::kUTF8); in MakeFancyBlob() local
55 SkAutoTArray<SkGlyphID> glyphs(glyphCount); in MakeFancyBlob()
56 font.textToGlyphs(text, textLen, SkTextEncoding::kUTF8, glyphs.get(), glyphCount); in MakeFancyBlob()
57 SkAutoTArray<SkScalar> widths(glyphCount); in MakeFancyBlob()
58 font.getWidths(glyphs.get(), glyphCount, widths.get()); in MakeFancyBlob()
66 const int defaultRunLen = glyphCount / 3; in MakeFancyBlob()
79 const int horizontalRunLen = glyphCount / 3; in MakeFancyBlob()
93 const int fullRunLen = glyphCount - glyphIndex; in MakeFancyBlob()
/third_party/skia/src/core/
H A DSkTextBlob.cpp39 size_t SkTextBlob::RunRecord::StorageSize(uint32_t glyphCount, uint32_t textSize, in StorageSize() argument
44 auto glyphSize = safe->mul(glyphCount, sizeof(uint16_t)), in StorageSize()
45 posSize = safe->mul(PosCount(glyphCount, positioning, safe), sizeof(SkScalar)); in StorageSize()
54 size = safe->add(size, safe->mul(glyphCount, sizeof(uint32_t))); in StorageSize()
102 + StorageSize(run->glyphCount(), run->textSize(), run->positioning(), &safe)); in NextUnchecked()
107 size_t SkTextBlob::RunRecord::PosCount(uint32_t glyphCount, in PosCount() argument
110 return safe->mul(glyphCount, ScalarsPerGlyph(positioning)); in PosCount()
272 font.measureText(run.glyphBuffer(), run.glyphCount() * sizeof(uint16_t), in TightRunBounds()
277 SkAutoSTArray<16, SkRect> glyphBounds(run.glyphCount()); in TightRunBounds()
278 font.getBounds(run.glyphBuffer(), run.glyphCount(), glyphBound in TightRunBounds()
700 int glyphCount = reader.read32(); MakeFromBuffer() local
1052 const auto glyphCount = run.glyphCount(); GetPointsForTextBlob() local
[all...]
H A DSkTextBlobPriv.h80 uint32_t glyphCount() const { in glyphCount() function in SkTextBlob::RunRecord
136 static size_t StorageSize(uint32_t glyphCount, uint32_t textSize,
157 static size_t PosCount(uint32_t glyphCount,
199 uint32_t glyphCount() const { in glyphCount() function in SkTextBlobRunIterator
201 return fCurrentRun->glyphCount(); in glyphCount()
H A DSkTypeface_remote.h46 int glyphCount, in SkTypefaceProxy()
54 , fGlyphCount{glyphCount}
59 int glyphCount() const {return fGlyphCount;} in glyphCount() function in SkTypefaceProxy
125 return this->glyphCount();
45 SkTypefaceProxy(SkFontID fontId, int glyphCount, const SkFontStyle& style, bool isFixed, bool glyphMaskNeedsCurrentColor, sk_sp<SkStrikeClient::DiscardableHandleManager> manager, bool isLogging = true) SkTypefaceProxy() argument
/third_party/icu/icu4c/source/test/perf/leperf/
H A Dleperf.cpp28 le_int32 glyphCount; member in Params
46 le_int32 glyphCount = 0; in iterate() local
48 glyphCount = engine->layoutChars(chars, 0, params->charLen, params->charLen, true, 0.0, 0.0, status); in iterate()
49 glyphs = LE_NEW_ARRAY(LEGlyphID, glyphCount + 10); in iterate()
50 indices = LE_NEW_ARRAY(le_int32, glyphCount + 10); in iterate()
51 positions = LE_NEW_ARRAY(float, glyphCount + 10); in iterate()
53 params->glyphCount = glyphCount; in iterate()
118 u_printf("leperf: glyphs=%d\n", p.glyphCount); in main()
H A Dxmlreader.cpp187 int32_t glyphCount = 0, indexCount = 0, positionCount = 0; in readTestFile() local
232 expected.glyphs = (LEGlyphID *) getHexArray(glyphs, glyphCount); in readTestFile()
236 expected.glyphCount = glyphCount; in readTestFile()
238 if (glyphCount < charCount || indexCount != glyphCount || positionCount < glyphCount * 2 + 2) { in readTestFile()
239 log_err("Test %s: inconsistent input data: charCount = %d, glyphCount = %d, indexCount = %d, positionCount = %d\n", in readTestFile()
240 id, charCount, glyphCount, indexCount, positionCount); in readTestFile()
/third_party/skia/modules/skplaintexteditor/src/
H A Dshape.cpp33 size_t glyphCount,
113 int glyphCount = SkTFitsIn<int>(info.glyphCount) ? info.glyphCount : INT_MAX; in runBuffer() local
116 const auto& runBuffer = fBuilder.allocRunTextPos(info.fFont, glyphCount, utf8RangeSize); in runBuffer()
124 fGlyphCount = glyphCount; in runBuffer()
135 // for (size_t i = 0; i < info.glyphCount; ++i) { in commitRunBuffer()
144 info.glyphCount, in commitRunBuffer()
186 size_t glyphCount, in set_character_bounds()
193 SkASSERT(glyphCount > in set_character_bounds()
183 set_character_bounds(void* context, const char* utf8Text, size_t utf8TextBytes, size_t glyphCount, const SkGlyphID* glyphs, const SkPoint* positions, const uint32_t* clusters, const SkFont& font) set_character_bounds() argument
[all...]
/third_party/icu/icu4c/source/test/letest/
H A Dletest.cpp64 le_int32 glyphCount = 0; in ParamTest() local
66 glyphCount = engine->getGlyphCount(); in ParamTest()
67 if (glyphCount != 0) { in ParamTest()
68 log_err("Calling getGlyphCount() on an empty layout returned %d.\n", glyphCount); in ParamTest()
71 glyphs = NEW_ARRAY(LEGlyphID, glyphCount + 10); in ParamTest()
72 indices = NEW_ARRAY(le_int32, glyphCount + 10); in ParamTest()
73 positions = NEW_ARRAY(float, glyphCount + 10); in ParamTest()
149 glyphCount = engine->layoutChars(NULL, 0, 0, 0, false, 0.0, 0.0, status); in ParamTest()
162 glyphCount = engine->layoutChars(chars, -1, 6, 20, true, 0.0, 0.0, status); in ParamTest()
169 glyphCount in ParamTest()
246 le_int32 glyphCount; AccessTest() local
615 int32_t glyphCount = 0, indexCount = 0, positionCount = 0; DataDrivenTest() local
900 le_int32 glyphCount = visualRun->getGlyphCount(); GlyphToCharTest() local
[all...]
H A Dcletest.c49 le_int32 glyphCount = 0; in ParamTest() local
59 glyphCount = le_getGlyphCount(engine, &status); in ParamTest()
60 if (glyphCount != 0) { in ParamTest()
61 log_err("Calling getGlyphCount() on an empty layout returned %d.\n", glyphCount); in ParamTest()
64 glyphs = NEW_ARRAY(LEGlyphID, glyphCount + 10); in ParamTest()
65 indices = NEW_ARRAY(le_int32, glyphCount + 10); in ParamTest()
66 positions = NEW_ARRAY(float, glyphCount + 10); in ParamTest()
128 glyphCount = le_layoutChars(engine, NULL, 0, 0, 0, false, 0.0, 0.0, &status); in ParamTest()
135 glyphCount = le_layoutChars(engine, chars, -1, 6, 20, true, 0.0, 0.0, &status); in ParamTest()
142 glyphCount in ParamTest()
218 le_int32 glyphCount; AccessTest() local
670 const le_int32 glyphCount = pl_getVisualRunGlyphCount(visualRun); GlyphToCharTest() local
[all...]
H A Dxmlreader.cpp183 int32_t glyphCount = 0, indexCount = 0, positionCount = 0; in readTestFile() local
228 expected.glyphs = (LEGlyphID *) getHexArray(glyphs, glyphCount); in readTestFile()
232 expected.glyphCount = glyphCount; in readTestFile()
234 if (glyphCount < charCount || indexCount != glyphCount || positionCount < glyphCount * 2 + 2) { in readTestFile()
235 log_err("Test %s: inconsistent input data: charCount = %d, glyphCount = %d, indexCount = %d, positionCount = %d\n", in readTestFile()
236 id, charCount, glyphCount, indexCount, positionCount); in readTestFile()
H A Dgendata.cpp206 int32_t glyphCount = 0; in main() local
316 glyphCount = engine->layoutChars(text.getBuffer(), 0, charCount, charCount, getRTL(text), 0, 0, leStatus); in main()
318 glyphs = NEW_ARRAY(LEGlyphID, glyphCount); in main()
319 indices = NEW_ARRAY(le_int32, glyphCount); in main()
320 positions = NEW_ARRAY(float, glyphCount * 2 + 2); in main()
333 dumpLongs(outputFile, "result-glyphs", (le_int32 *) glyphs, glyphCount); in main()
335 dumpLongs(outputFile, "result-indices", indices, glyphCount); in main()
337 dumpFloats(outputFile, "result-positions", positions, glyphCount * 2 + 2); in main()
/third_party/skia/modules/skshaper/src/
H A DSkShaper_primitive.cpp205 int glyphCount = font.CountText(utf8, utf8Bytes, RSDrawing::TextEncoding::UTF8); in shape() local
207 int glyphCount = font.countText(utf8, utf8Bytes, SkTextEncoding::kUTF8); in shape() local
210 if (glyphCount < 0) { in shape()
214 std::unique_ptr<SkGlyphID[]> glyphs(new SkGlyphID[glyphCount]); in shape()
216 font.TextToGlyphs(utf8, utf8Bytes, RSDrawing::TextEncoding::UTF8, glyphs.get(), glyphCount); in shape()
218 font.textToGlyphs(utf8, utf8Bytes, SkTextEncoding::kUTF8, glyphs.get(), glyphCount); in shape()
221 std::unique_ptr<SkScalar[]> advances(new SkScalar[glyphCount]); in shape()
223 font.GetWidths(glyphs.get(), glyphCount, advances.get(), nullptr); in shape()
225 font.getWidthsBounds(glyphs.get(), glyphCount, advances.get(), nullptr, nullptr); in shape()
250 if (info.glyphCount) { in shape()
[all...]
/third_party/skia/experimental/sktext/src/
H A DLogicalRun.cpp18 fGlyphs.push_back_n(info.glyphCount); in LogicalRun()
19 fBounds.push_back_n(info.glyphCount); in LogicalRun()
20 fPositions.push_back_n(info.glyphCount + 1); in LogicalRun()
21 fOffsets.push_back_n(info.glyphCount); in LogicalRun()
22 fClusters.push_back_n(info.glyphCount + 1); in LogicalRun()
/third_party/skia/tests/
H A DTextBlobTest.cpp161 const int glyphCount = font.countText(txt, txtLen, SkTextEncoding::kUTF8); in TestBounds() local
162 const SkTextBlobBuilder::RunBuffer& buffer = builder.allocRunPos(font, glyphCount); in TestBounds()
164 font.textToGlyphs(txt, txtLen, SkTextEncoding::kUTF8, buffer.glyphs, glyphCount); in TestBounds()
166 memset(buffer.pos, 0, sizeof(SkScalar) * glyphCount * 2); in TestBounds()
244 REPORTER_ASSERT(reporter, out[i].count == it.glyphCount()); in RunBuilderTest()
252 for (unsigned k = 0; k < it.glyphCount(); ++k) { in RunBuilderTest()
316 int glyphCount = font.countText(text1, strlen(text1), SkTextEncoding::kUTF8); in DEF_TEST() local
317 SkAutoTMalloc<uint16_t> glyphs(glyphCount); in DEF_TEST()
318 (void)font.textToGlyphs(text1, strlen(text1), SkTextEncoding::kUTF8, glyphs.get(), glyphCount); in DEF_TEST()
320 auto run = textBlobBuilder.allocRunText(font, glyphCount, in DEF_TEST()
358 int glyphCount = font.countText(text, strlen(text), SkTextEncoding::kUTF8); add_run() local
[all...]
H A DSkRemoteGlyphCacheTest.cpp121 sk_sp<SkTextBlob> buildTextBlob(sk_sp<SkTypeface> tf, int glyphCount) { in buildTextBlob() argument
131 const auto& runBuffer = builder.allocRunPosH(font, glyphCount, 0, &bounds); in buildTextBlob()
135 for (int i = 0; i < glyphCount; i++) { in buildTextBlob()
214 int glyphCount = 10; in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
215 auto serverBlob = buildTextBlob(serverTf, glyphCount); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
228 auto clientBlob = buildTextBlob(clientTf, glyphCount); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
251 int glyphCount = 10; in DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
252 auto serverBlob = buildTextBlob(serverTf, glyphCount); in DEF_GPUTEST_FOR_RENDERING_CONTEXTS()
276 int glyphCount = 10; in DEF_TEST() local
277 auto serverBlob = buildTextBlob(serverTf, glyphCount); in DEF_TEST()
313 int glyphCount = 10; DEF_TEST() local
353 int glyphCount = 10; DEF_TEST() local
395 int glyphCount = 10; DEF_TEST() local
424 int glyphCount = 10; DEF_TEST() local
446 int glyphCount = 10; DEF_TEST() local
477 int glyphCount = 10; DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
666 int glyphCount = 10; DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
711 int glyphCount = 10; DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
746 int glyphCount = 10; DEF_GPUTEST_FOR_RENDERING_CONTEXTS() local
[all...]
H A DShaperTest.cpp38 fGlyphCount = SkToUInt(info.glyphCount);
40 fGlyphs = std::make_unique<SkGlyphID[]>(info.glyphCount);
41 fPositions = std::make_unique<SkPoint[]>(info.glyphCount);
42 fClusters = std::make_unique<uint32_t[]>(info.glyphCount);
50 REPORTER_ASSERT(fReporter, fGlyphCount == info.glyphCount, "%s", fResource);
H A DSkScalerCacheTest.cpp48 constexpr size_t glyphCount = 'z' - ' '; in DEF_TEST() local
49 auto data = SkMakeZip(glyphs, pos).subspan(SkTo<int>(' '), glyphCount); in DEF_TEST()
69 drawable.ensureSize(glyphCount); in DEF_TEST()
/third_party/skia/src/utils/
H A DSkCustomTypeface.cpp75 int onCountGlyphs() const override { return this->glyphCount(); }
93 int glyphCount() const { in glyphCount() function in final
155 for (int gid = 0; gid < this->glyphCount(); ++gid) { in getGlyphToUnicodeMap()
170 glyphs[i] = uni[i] < this->glyphCount() ? SkTo<SkGlyphID>(uni[i]) : 0; in onCharsToGlyphs()
331 wstream.write32(this->glyphCount()); in onOpenStream()
338 wstream.write(fAdvances.data(), this->glyphCount() * sizeof(float)); in onOpenStream()
393 int glyphCount; in Deserialize() local
394 if (!stream->readS32(&glyphCount) || glyphCount < 0 || glyphCount > kMaxGlyphCoun in Deserialize()
[all...]
/third_party/icu/icu4c/source/layoutex/
H A DParagraphLayout.cpp397 fStyleRunInfo[run].glyphCount = 0; in ParagraphLayout()
420 fStyleRunInfo[run].glyphCount = fStyleRunInfo[run].engine->layoutChars(fChars, runStart, fStyleRunLimits[run] - runStart, fCharCount, in ParagraphLayout()
429 fGlyphCount += fStyleRunInfo[run].glyphCount; in ParagraphLayout()
453 le_int32 glyphCount = fStyleRunInfo[run].glyphCount; in ParagraphLayout() local
456 fStyleRunInfo[run].glyphs = LE_NEW_ARRAY(LEGlyphID, glyphCount); in ParagraphLayout()
457 fStyleRunInfo[run].positions = LE_NEW_ARRAY(float, glyphCount * 2 + 2); in ParagraphLayout()
482 for (glyph = 0; glyph < glyphCount; glyph += 1) { in ParagraphLayout()
487 LXUtilities::reverse(&fGlyphWidths[glyphBase], glyphCount); in ParagraphLayout()
488 LXUtilities::reverse(&fGlyphToCharMap[glyphBase], glyphCount); in ParagraphLayout()
1102 le_int32 glyphCount = rightGlyph - leftGlyph; appendRun() local
1208 le_int32 glyphCount = lastRun->getGlyphCount(); getWidth() local
1223 append(const LEFontInstance *font, UBiDiDirection direction, le_int32 glyphCount, const LEGlyphID glyphs[], const float positions[], const le_int32 glyphToCharMap[]) append() argument
[all...]
/third_party/skia/modules/svg/src/
H A DSkSVGText.cpp415 const auto& buf = blobBuilder.allocRunRSXform(run.font, SkToInt(run.glyphCount)); in flushChunk()
416 std::copy(run.glyphs.get(), run.glyphs.get() + run.glyphCount, buf.glyphs); in flushChunk()
417 for (size_t i = 0; i < run.glyphCount; ++i) { in flushChunk()
435 SkASSERT(ri.glyphCount); in runBuffer()
441 std::make_unique<SkGlyphID[] >(ri.glyphCount), in runBuffer()
442 std::make_unique<SkPoint[] >(ri.glyphCount), in runBuffer()
443 std::make_unique<PositionAdjustment[]>(ri.glyphCount), in runBuffer()
444 ri.glyphCount, in runBuffer()
449 fShapeClusterBuffer.resize(std::max(fShapeClusterBuffer.size(), ri.glyphCount)); in runBuffer()
464 for (size_t i = 0; i < ri.glyphCount; in commitRunBuffer()
[all...]
/third_party/skia/third_party/externals/sfntly/java/test/com/google/typography/font/tools/subsetter/
H A DBasicSubsetTests.java48 int glyphCount = 11; in testSubsetGlyphs()
55 List<Integer> srcLoca = new ArrayList<Integer>(glyphCount + 1); in testSubsetGlyphs()
56 for (int i = 0; i <= glyphCount + 1; i++) { in testSubsetGlyphs()
64 List<Integer> glyphs = new ArrayList<Integer>(glyphCount); in testSubsetGlyphs()
98 List<Integer> dstLoca = new ArrayList<Integer>(glyphCount + 1); in testSubsetGlyphs()
99 for (int i = 0; i <= glyphCount + 1; i++) { in testSubsetGlyphs()
/third_party/skia/bench/
H A DTypefaceBench.cpp233 maxGlyphs = std::max(maxGlyphs, fLines.back()->glyphCount);
245 fGlyphIds.data(), line->glyphCount);
252 int glyphCount = 0; member
262 result->glyphCount = SkUTF::CountUTF8(cursor, len); in convertLine()
/third_party/skia/experimental/sktext/tests/
H A DWrappedText.cpp66 void onEndLine(size_t index, TextRange lineText, GlyphRange trailingSpaces, size_t glyphCount) override {
75 size_t glyphCount, // Just the number of glyphs
81 SkSpan<const uint16_t>(&glyphs[0], glyphCount),
82 SkSpan<const SkPoint>(&positions[0], glyphCount + 1),
83 SkSpan<const TextIndex>(&clusters[0], glyphCount + 1),
/third_party/skia/modules/skshaper/tests/
H A DShaperTest.cpp48 fGlyphCount = SkToUInt(info.glyphCount);
50 fGlyphs = std::make_unique<SkGlyphID[]>(info.glyphCount);
51 fPositions = std::make_unique<SkPoint[]>(info.glyphCount);
52 fClusters = std::make_unique<uint32_t[]>(info.glyphCount);
60 REPORTER_ASSERT(fReporter, fGlyphCount == info.glyphCount, "%s", fResource);
83 for (auto&& [glyph, cluster] : SkZip(info.glyphCount, fGlyphs.get(), fClusters.get())) {
95 "%s range: %zu-%zu(%zu) glyphCount:%u font: \"%s\" \"%s\" #%d %zuB\n"
108 "%" PRIu32 " >= %zu %s i:%u glyphCount:%u",
111 "%" PRIu32 " < %zu %s i:%u glyphCount:%u",

Completed in 20 milliseconds

1234