Home
last modified time | relevance | path

Searched refs:advances (Results 1 – 24 of 24) sorted by relevance

/frameworks/minikin/tests/unittest/
DLayoutCoreTest.cpp81 EXPECT_EQ(1u, layout.advances().size()); in TEST()
82 EXPECT_EQ(10.0f, layout.advances()[0]); in TEST()
96 EXPECT_EQ(2u, layout.advances().size()); in TEST()
97 EXPECT_EQ(10.0f, layout.advances()[0]); in TEST()
98 EXPECT_EQ(10.0f, layout.advances()[1]); in TEST()
112 EXPECT_EQ(2u, layout.advances().size()); in TEST()
113 EXPECT_EQ(10.0f, layout.advances()[0]); in TEST()
114 EXPECT_EQ(50.0f, layout.advances()[1]); in TEST()
139 EXPECT_EQ(2u, layout.advances().size()); in TEST()
140 EXPECT_EQ(10.0f, layout.advances()[0]); in TEST()
[all …]
DLayoutTest.cpp29 static void expectAdvances(const std::vector<float>& expected, const std::vector<float>& advances) { in expectAdvances() argument
30 EXPECT_LE(expected.size(), advances.size()); in expectAdvances()
32 EXPECT_EQ(expected[i], advances[i]) in expectAdvances()
34 << ", Actual: " << advances[i]; in expectAdvances()
430 std::vector<float> advances(text.size()); in TEST_F() local
433 EndHyphenEdit::NO_EDIT, advances.data())); in TEST_F()
434 ASSERT_EQ(1u, advances.size()); in TEST_F()
435 EXPECT_EQ(1.0f, advances[0]); in TEST_F()
440 std::vector<float> advances(text.size()); in TEST_F() local
443 EndHyphenEdit::NO_EDIT, advances.data())); in TEST_F()
[all …]
DMeasurementTests.cpp25 float getAdvance(const float* advances, const char* src) { in getAdvance() argument
31 return getRunAdvance(advances, buf, 0, size, offset); in getAdvance()
DLineBreakerTestHelper.h58 virtual void getMetrics(const U16StringPiece&, std::vector<float>* advances, LayoutPieces*, in getMetrics() argument
60 std::fill(advances->begin() + mRange.getStart(), advances->begin() + mRange.getEnd(), in getMetrics()
DGraphemeBreakTests.cpp36 bool IsBreakWithAdvances(const float* advances, const char* src) { in IsBreakWithAdvances() argument
42 return GraphemeBreak::isGraphemeBreak(advances, buf, 0, size, offset); in IsBreakWithAdvances()
/frameworks/minikin/libs/minikin/
DLayout.cpp62 EndHyphenEdit endHyphen, float* advances) { in measureText() argument
66 float* advancesForRun = advances ? advances + offset : nullptr; in measureText()
76 Layout* layout, float* advances) { in doLayoutRunCached() argument
88 advances ? advances + (piece.getStart() - range.getStart()) : nullptr; in doLayoutRunCached()
99 LayoutAppendFunctor(Layout* layout, float* advances, float* totalAdvance, uint32_t outOffset, in LayoutAppendFunctor() argument
102 mAdvances(advances), in LayoutAppendFunctor()
112 const std::vector<float>& advances = layoutPiece.advances(); in operator ()() local
113 std::copy(advances.begin(), advances.end(), mAdvances); in operator ()()
131 float* advances) { in doLayoutWord() argument
137 LayoutAppendFunctor f(layout, advances, &totalAdvance, bufStart, wordSpacing); in doLayoutWord()
[all …]
DMeasurement.cpp29 static float getRunAdvance(const float* advances, const uint16_t* buf, size_t layoutStart, in getRunAdvance() argument
35 float charAdvance = advances[i - layoutStart]; in getRunAdvance()
42 if (offset < start + count && advances[offset - layoutStart] == 0.0f) { in getRunAdvance()
48 if (advances[nextCluster - layoutStart] != 0.0f) break; in getRunAdvance()
54 if (GraphemeBreak::isGraphemeBreak(advances + (start - layoutStart), buf, start, count, in getRunAdvance()
69 float getRunAdvance(const float* advances, const uint16_t* buf, size_t start, size_t count, in getRunAdvance() argument
71 return getRunAdvance(advances, buf, start, start, count, offset); in getRunAdvance()
82 size_t getOffsetForAdvance(const float* advances, const uint16_t* buf, size_t start, size_t count, in getOffsetForAdvance() argument
87 if (GraphemeBreak::isGraphemeBreak(advances, buf, start, count, i)) { in getOffsetForAdvance()
91 float width = advances[i - start]; in getOffsetForAdvance()
[all …]
DGraphemeBreak.cpp62 bool GraphemeBreak::isGraphemeBreak(const float* advances, const uint16_t* buf, size_t start, in isGraphemeBreak() argument
112 const bool c2_has_advance = (advances != nullptr && advances[offset - start] != 0.0); in isGraphemeBreak()
155 if (advances != nullptr) { in isGraphemeBreak()
188 size_t GraphemeBreak::getTextRunCursor(const float* advances, const uint16_t* buf, size_t start, in getTextRunCursor() argument
197 while (!isGraphemeBreak(advances, buf, start, count, offset)) { in getTextRunCursor()
207 while (!isGraphemeBreak(advances, buf, start, count, offset)) { in getTextRunCursor()
212 if (!isGraphemeBreak(advances, buf, start, count, offset)) { in getTextRunCursor()
DMeasuredText.cpp41 const std::vector<float>& advances = layoutPiece.advances(); in operator ()() local
42 std::copy(advances.begin(), advances.end(), mOutAdvances->begin() + mRange.getStart()); in operator ()()
56 void StyleRun::getMetrics(const U16StringPiece& textBuf, std::vector<float>* advances, in getMetrics() argument
58 AdvancesCompositor compositor(advances, outPieces); in getMetrics()
DLayoutCore.cpp86 hb_position_t* advances = first_advance; in harfbuzzGetGlyphHorizontalAdvances() local
88 *advances = HBFloatToFixed(advVec[i]); in harfbuzzGetGlyphHorizontalAdvances()
89 advances = reinterpret_cast<hb_position_t*>(reinterpret_cast<uint8_t*>(advances) + in harfbuzzGetGlyphHorizontalAdvances()
/frameworks/layoutlib/bridge/src/android/graphics/
DBidiRenderer.java104 public RectF renderText(int start, int limit, int bidiFlags, float[] advances, in renderText() argument
111 renderText(visualRun.getStart(), visualRun.getLimit(), isRtl, advances, in renderText() local
132 public RectF renderText(int start, int limit, boolean isRtl, float[] advances, in renderText() argument
139 renderScript(run.start, run.limit, run.font, flag, advances, advancesIndex, draw); in renderText()
151 float[] advances, int advancesIndex, boolean draw) { in renderScript() argument
160 render(start, limit, preferredFont, flag, advances, advancesIndex, draw); in renderScript()
165 render(start, canDisplayUpTo, preferredFont, flag, advances, advancesIndex, draw); in renderScript()
204 render(start, highestUpTo, bestFont, flag, advances, advancesIndex, draw); in renderScript()
215 render(start, start + charCount, preferredFont, flag, advances, advancesIndex, in renderScript()
233 private void render(int start, int limit, Font font, int flag, float[] advances, in render() argument
[all …]
DPaint_Delegate.java956 int bidiFlags, float[] advances, int advancesIndex) { in nGetTextAdvances() argument
958 if (advances != null) in nGetTextAdvances()
960 advances[i]=0; in nGetTextAdvances()
967 RectF bounds = delegate.measureText(text, index, count, advances, advancesIndex, bidiFlags); in nGetTextAdvances()
973 int contextStart, int contextEnd, int bidiFlags, float[] advances, int advancesIndex) { in nGetTextAdvances() argument
980 contextStart, contextEnd - contextStart, bidiFlags, advances, advancesIndex); in nGetTextAdvances()
1158 float[] advances = new float[count]; in nGetRunAdvance() local
1161 contextEnd - contextStart, bidiFlags, advances, 0); in nGetRunAdvance()
1165 sum += advances[i]; in nGetRunAdvance()
1174 float[] advances = new float[count]; in nGetOffsetForAdvance() local
[all …]
/frameworks/minikin/include/minikin/
DLayout.h81 EndHyphenEdit endHyphen, float* advances);
83 const std::vector<float>& advances() const { return mAdvances; } in advances() function
119 Layout* layout, float* advances);
125 float* advances);
DMeasurement.h25 float getRunAdvance(const float* advances, const uint16_t* buf, size_t start, size_t count,
28 size_t getOffsetForAdvance(const float* advances, const uint16_t* buf, size_t start, size_t count,
DGraphemeBreak.h33 static bool isGraphemeBreak(const float* advances, const uint16_t* buf, size_t start,
38 static size_t getTextRunCursor(const float* advances, const uint16_t* buf, size_t start,
DMeasuredText.h48 virtual void getMetrics(const U16StringPiece& text, std::vector<float>* advances,
93 void getMetrics(const U16StringPiece& text, std::vector<float>* advances,
127 void getMetrics(const U16StringPiece& /* text */, std::vector<float>* advances, in getMetrics() argument
129 (*advances)[mRange.getStart()] = mWidth; in getMetrics()
DLayoutCore.h54 const std::vector<float> advances() const { return mAdvances; } in advances() function
/frameworks/base/libs/hwui/hwui/
DMinikinUtils.cpp74 size_t count, size_t bufSize, float* advances) { in measureText() argument
82 endHyphen, advances); in measureText()
DMinikinUtils.h54 float* advances);
/frameworks/base/core/java/android/text/
DGraphicsOperations.java56 boolean isRtl, float[] advances, int advancesIndex, Paint paint); in getTextRunAdvances() argument
DSpannableStringBuilder.java1514 float[] advances, int advancesPos, Paint p) { in getTextRunAdvances() argument
1523 isRtl, advances, advancesPos); in getTextRunAdvances()
1526 contextStart + mGapLength, contextLen, isRtl, advances, advancesPos); in getTextRunAdvances()
1531 0, contextLen, isRtl, advances, advancesPos); in getTextRunAdvances()
/frameworks/base/core/jni/android/graphics/
DPaint.cpp192 jfloatArray advances, jint advancesIndex) { in doTextAdvances() argument
202 if (advances) { in doTextAdvances()
203 size_t advancesLength = env->GetArrayLength(advances); in doTextAdvances()
210 if (advances) { in doTextAdvances()
216 if (advances) { in doTextAdvances()
217 env->SetFloatArrayRegion(advances, advancesIndex, count, advancesArray.get()); in doTextAdvances()
224 jint bidiFlags, jfloatArray advances, jint advancesIndex) { in getTextAdvances___CIIIII_FI() argument
229 index - contextIndex, count, contextCount, bidiFlags, advances, advancesIndex); in getTextAdvances___CIIIII_FI()
236 jfloatArray advances, jint advancesIndex) { in getTextAdvances__StringIIIII_FI() argument
242 advances, advancesIndex); in getTextAdvances__StringIIIII_FI()
/frameworks/base/graphics/java/android/graphics/
DPaint.java2580 @IntRange(from = 0) int contextCount, boolean isRtl, @Nullable float[] advances, in getTextRunAdvances() argument
2589 | (advances == null ? 0 : in getTextRunAdvances()
2590 (advances.length - (advancesIndex + count)))) < 0) { in getTextRunAdvances()
2599 isRtl ? BIDI_FORCE_RTL : BIDI_FORCE_LTR, advances, in getTextRunAdvances()
2606 contextCount, isRtl ? BIDI_FORCE_RTL : BIDI_FORCE_LTR, advances, advancesIndex); in getTextRunAdvances()
2609 if (advances != null) { in getTextRunAdvances()
2611 advances[i] *= mInvCompatScaling; in getTextRunAdvances()
3054 int contextIndex, int contextCount, int bidiFlags, float[] advances, int advancesIndex); in nGetTextAdvances() argument
3056 int contextStart, int contextEnd, int bidiFlags, float[] advances, int advancesIndex); in nGetTextAdvances() argument
/frameworks/base/core/java/android/widget/
DTextView.java13226 int contextEnd, boolean isRtl, float[] advances, int advancesIndex, in getTextRunAdvances() argument
13231 contextStart + mStart, contextCount, isRtl, advances, in getTextRunAdvances()