/frameworks/minikin/tests/unittest/ |
D | OptimalLineBreakerTest.cpp | 92 const std::vector<uint16_t> textBuf = utf8ToUtf16("This is an example text."); in TEST_F() local 104 auto actual = doLineBreak(textBuf, HIGH_QUALITY, NO_HYPHENATION, CHAR_WIDTH, LINE_WIDTH); in TEST_F() 107 << toString(textBuf, actual); in TEST_F() 108 actual = doLineBreak(textBuf, HIGH_QUALITY, NORMAL_HYPHENATION, CHAR_WIDTH, LINE_WIDTH); in TEST_F() 111 << toString(textBuf, actual); in TEST_F() 112 actual = doLineBreak(textBuf, BALANCED, NO_HYPHENATION, CHAR_WIDTH, LINE_WIDTH); in TEST_F() 115 << toString(textBuf, actual); in TEST_F() 116 actual = doLineBreak(textBuf, BALANCED, NORMAL_HYPHENATION, CHAR_WIDTH, LINE_WIDTH); in TEST_F() 119 << toString(textBuf, actual); in TEST_F() 126 auto actual = doLineBreak(textBuf, HIGH_QUALITY, NO_HYPHENATION, CHAR_WIDTH, LINE_WIDTH); in TEST_F() [all …]
|
D | GreedyLineBreakerTest.cpp | 83 const std::vector<uint16_t> textBuf = utf8ToUtf16("This is an example text."); in TEST_F() local 94 const auto actual = doLineBreak(textBuf, NO_HYPHEN, CHAR_WIDTH, LINE_WIDTH); in TEST_F() 97 << toString(textBuf, actual); in TEST_F() 105 const auto actual = doLineBreak(textBuf, NO_HYPHEN, CHAR_WIDTH, LINE_WIDTH); in TEST_F() 108 << toString(textBuf, actual); in TEST_F() 119 const auto actual = doLineBreak(textBuf, NO_HYPHEN, CHAR_WIDTH, LINE_WIDTH); in TEST_F() 122 << toString(textBuf, actual); in TEST_F() 135 const auto actual = doLineBreak(textBuf, NO_HYPHEN, CHAR_WIDTH, LINE_WIDTH); in TEST_F() 138 << toString(textBuf, actual); in TEST_F() 151 const auto actual = doLineBreak(textBuf, NO_HYPHEN, CHAR_WIDTH, LINE_WIDTH); in TEST_F() [all …]
|
D | LineBreakerTestHelper.h | 157 static std::string toString(const U16StringPiece& textBuf, const LineBreakResult& lines) { in toString() argument 165 std::string hyphenatedStr = utf16ToUtf8(textBuf.substr(textRange)); in toString()
|
/frameworks/minikin/libs/minikin/ |
D | MeasuredText.cpp | 27 void MeasuredText::measure(const U16StringPiece& textBuf, bool computeHyphenation, in measure() argument 29 if (textBuf.size() == 0) { in measure() 33 CharProcessor proc(textBuf); in measure() 37 run->getMetrics(textBuf, widths.data() + runOffset, extents.data() + runOffset, piecesOut); in measure() 45 proc.feedChar(i, textBuf[i], widths[i]); in measure() 52 populateHyphenationPoints(textBuf, *run, *proc.hyphenator, proc.contextRange(), in measure() 58 void MeasuredText::buildLayout(const U16StringPiece& textBuf, const Range& range, in buildLayout() argument 62 layout->doLayoutWithPrecomputedPieces(textBuf, range, bidiFlags, paint, startHyphen, endHyphen, in buildLayout() 66 MinikinRect MeasuredText::getBounds(const U16StringPiece& textBuf, const Range& range) { in getBounds() argument 75 run->getBounds(textBuf, Range::intersection(runRange, range), layoutPieces); in getBounds()
|
D | OptimalLineBreaker.cpp | 207 OptimizeContext populateCandidates(const U16StringPiece& textBuf, const MeasuredText& measured, in populateCandidates() argument 211 CharProcessor proc(textBuf); in populateCandidates() 233 MINIKIN_ASSERT(textBuf[i] != CHAR_TAB, "TAB is not supported in optimal line breaker"); in populateCandidates() 234 proc.feedChar(i, textBuf[i], measured.widths[i]); in populateCandidates() 273 LineBreakResult computeBreaks(const OptimizeContext& context, const U16StringPiece& textBuf, 284 LineBreakResult finishBreaksOptimal(const U16StringPiece& textBuf, const MeasuredText& measured, 288 MinikinExtent computeMaxExtent(const U16StringPiece& textBuf, const MeasuredText& measured, 294 MinikinExtent LineBreakOptimizer::computeMaxExtent(const U16StringPiece& textBuf, in computeMaxExtent() argument 299 if (!isLineSpaceExcludeChar(textBuf[j])) { in computeMaxExtent() 308 const U16StringPiece& textBuf, const MeasuredText& measured, in finishBreaksOptimal() argument [all …]
|
D | Layout.cpp | 228 void Layout::doLayout(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags, in doLayout() argument 236 for (const BidiText::RunInfo& runInfo : BidiText(textBuf, range, bidiFlags)) { in doLayout() 237 doLayoutRunCached(textBuf, runInfo.range, runInfo.isRtl, paint, range.getStart(), in doLayout() 243 void Layout::doLayoutWithPrecomputedPieces(const U16StringPiece& textBuf, const Range& range, in doLayoutWithPrecomputedPieces() argument 252 for (const BidiText::RunInfo& runInfo : BidiText(textBuf, range, bidiFlags)) { in doLayoutWithPrecomputedPieces() 253 doLayoutRunCached(textBuf, runInfo.range, runInfo.isRtl, paint, range.getStart(), in doLayoutWithPrecomputedPieces() 258 std::pair<float, MinikinRect> Layout::getBoundsWithPrecomputedPieces(const U16StringPiece& textBuf, in getBoundsWithPrecomputedPieces() argument 265 for (const BidiText::RunInfo& runInfo : BidiText(textBuf, range, bidiFlags)) { in getBoundsWithPrecomputedPieces() 266 advance += doLayoutRunCached(textBuf, runInfo.range, runInfo.isRtl, paint, 0, in getBoundsWithPrecomputedPieces() 273 float Layout::measureText(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags, in measureText() argument [all …]
|
D | LineBreakerUtil.h | 70 const U16StringPiece& textBuf, // A text buffer. in populateHyphenationPoints() argument 82 hyphenate(textBuf.substr(hyphenationTargetRange), hyphenator); in populateHyphenationPoints() 90 U16StringPiece firstText = textBuf.substr(hyphenPart.first); in populateHyphenationPoints() 91 U16StringPiece secondText = textBuf.substr(hyphenPart.second); in populateHyphenationPoints()
|
D | BidiUtils.cpp | 75 BidiText::BidiText(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags) in BidiText() argument 96 ubidi_setPara(mBidi.get(), reinterpret_cast<const UChar*>(textBuf.data()), textBuf.size(), in BidiText()
|
D | GreedyLineBreaker.cpp | 41 GreedyLineBreaker(const U16StringPiece& textBuf, const MeasuredText& measured, in GreedyLineBreaker() argument 45 mTextBuf(textBuf), in GreedyLineBreaker() 384 LineBreakResult breakLineGreedy(const U16StringPiece& textBuf, const MeasuredText& measured, in breakLineGreedy() argument 387 if (textBuf.size() == 0) { in breakLineGreedy() 390 GreedyLineBreaker lineBreaker(textBuf, measured, lineWidthLimits, tabStops, enableHyphenation); in breakLineGreedy()
|
D | GreedyLineBreaker.h | 28 LineBreakResult breakLineGreedy(const U16StringPiece& textBuf, const MeasuredText& measured,
|
D | OptimalLineBreaker.h | 26 LineBreakResult breakLineOptimal(const U16StringPiece& textBuf, const MeasuredText& measured,
|
D | BidiUtils.h | 47 BidiText(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags);
|
/frameworks/minikin/include/minikin/ |
D | LayoutPieces.h | 42 void insert(const U16StringPiece& textBuf, const Range& range, const MinikinPaint& paint, in insert() 46 std::forward_as_tuple(textBuf, range, paint, dir, startEdit, endEdit), in insert() 54 void getOrCreate(const U16StringPiece& textBuf, const Range& range, const MinikinPaint& paint, in getOrCreate() 56 auto it = offsetMap.find(LayoutCacheKey(textBuf, range, paint, dir, startEdit, endEdit)); in getOrCreate() 58 LayoutCache::getInstance().getOrCreate(textBuf, range, paint, dir, startEdit, endEdit, in getOrCreate()
|
D | MeasuredText.h | 182 void buildLayout(const U16StringPiece& textBuf, const Range& range, const MinikinPaint& paint, 185 MinikinRect getBounds(const U16StringPiece& textBuf, const Range& range); 195 void measure(const U16StringPiece& textBuf, bool computeHyphenation, bool computeLayout); 198 MeasuredText(const U16StringPiece& textBuf, std::vector<std::unique_ptr<Run>>&& runs, in MeasuredText() argument 200 : widths(textBuf.size()), extents(textBuf.size()), runs(std::move(runs)) { in MeasuredText() 201 measure(textBuf, computeHyphenation, computeLayout); in MeasuredText() 223 std::unique_ptr<MeasuredText> build(const U16StringPiece& textBuf, bool computeHyphenation, in build() argument 227 new MeasuredText(textBuf, std::move(mRuns), computeHyphenation, computeLayout)); in build()
|
D | AndroidLineBreakerHelper.h | 95 LineBreakResult computeBreaks(const U16StringPiece& textBuf, const MeasuredText& measuredText, in computeBreaks() argument 104 return breakIntoLines(textBuf, mStrategy, mFrequency, mIsJustified, measuredText, lineWidth, in computeBreaks()
|
D | Layout.h | 163 static float doLayoutRunCached(const U16StringPiece& textBuf, const Range& range, bool isRtl,
|
/frameworks/base/libs/hwui/hwui/ |
D | MinikinUtils.cpp | 56 const minikin::U16StringPiece textBuf(buf, bufSize); in doLayout() local 63 layout.doLayout(textBuf,range, bidiFlags, minikinPaint, startHyphen, endHyphen); in doLayout() 65 mt->buildLayout(textBuf, range, minikinPaint, bidiFlags, startHyphen, endHyphen, &layout); in doLayout() 74 const minikin::U16StringPiece textBuf(buf, bufSize); in measureText() local 80 return minikin::Layout::measureText(textBuf, range, bidiFlags, minikinPaint, startHyphen, in measureText()
|
/frameworks/av/cmds/screenrecord/ |
D | Overlay.cpp | 235 char textBuf[64]; in processFrame_l() local 236 getTimeString_l(monotonicNsec, textBuf, sizeof(textBuf)); in processFrame_l() 238 textBuf, frameNumber, mTotalDroppedFrames)); in processFrame_l()
|