Home
last modified time | relevance | path

Searched refs:textBuf (Results 1 – 18 of 18) sorted by relevance

/frameworks/minikin/tests/unittest/
DOptimalLineBreakerTest.cpp92 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 …]
DGreedyLineBreakerTest.cpp83 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 …]
DLineBreakerTestHelper.h157 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/
DMeasuredText.cpp27 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()
DOptimalLineBreaker.cpp207 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 …]
DLayout.cpp228 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 …]
DLineBreakerUtil.h70 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()
DBidiUtils.cpp75 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()
DGreedyLineBreaker.cpp41 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()
DGreedyLineBreaker.h28 LineBreakResult breakLineGreedy(const U16StringPiece& textBuf, const MeasuredText& measured,
DOptimalLineBreaker.h26 LineBreakResult breakLineOptimal(const U16StringPiece& textBuf, const MeasuredText& measured,
DBidiUtils.h47 BidiText(const U16StringPiece& textBuf, const Range& range, Bidi bidiFlags);
/frameworks/minikin/include/minikin/
DLayoutPieces.h42 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()
DMeasuredText.h182 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()
DAndroidLineBreakerHelper.h95 LineBreakResult computeBreaks(const U16StringPiece& textBuf, const MeasuredText& measuredText, in computeBreaks() argument
104 return breakIntoLines(textBuf, mStrategy, mFrequency, mIsJustified, measuredText, lineWidth, in computeBreaks()
DLayout.h163 static float doLayoutRunCached(const U16StringPiece& textBuf, const Range& range, bool isRtl,
/frameworks/base/libs/hwui/hwui/
DMinikinUtils.cpp56 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/
DOverlay.cpp235 char textBuf[64]; in processFrame_l() local
236 getTimeString_l(monotonicNsec, textBuf, sizeof(textBuf)); in processFrame_l()
238 textBuf, frameNumber, mTotalDroppedFrames)); in processFrame_l()