Home
last modified time | relevance | path

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

/frameworks/minikin/tests/unittest/
DLayoutTest.cpp32 static void expectAdvances(std::vector<float> expected, float* advances, size_t length) { in expectAdvances() argument
35 EXPECT_EQ(expected[i], advances[i]) in expectAdvances()
37 << ", Actual: " << advances[i]; in expectAdvances()
39 EXPECT_EQ(UNTOUCHED_MARKER, advances[expected.size()]); in expectAdvances()
42 static void resetAdvances(float* advances, size_t length) { in resetAdvances() argument
44 advances[i] = UNTOUCHED_MARKER; in resetAdvances()
70 float advances[kMaxAdvanceLength]; in TEST_F() local
88 resetAdvances(advances, kMaxAdvanceLength); in TEST_F()
89 layout.getAdvances(advances); in TEST_F()
94 expectAdvances(expectedValues, advances, kMaxAdvanceLength); in TEST_F()
[all …]
DMeasurementTests.cpp23 float getAdvance(const float* advances, const char* src) { in getAdvance() argument
29 return getRunAdvance(advances, buf, 0, size, offset); in getAdvance()
DGraphemeBreakTests.cpp32 bool IsBreakWithAdvances(const float* advances, const char* src) { in IsBreakWithAdvances() argument
38 return GraphemeBreak::isGraphemeBreak(advances, buf, 0, size, offset); in IsBreakWithAdvances()
/frameworks/minikin/libs/minikin/
DMeasurement.cpp32 static float getRunAdvance(const float* advances, const uint16_t* buf, size_t layoutStart, in getRunAdvance() argument
38 float charAdvance = advances[i - layoutStart]; in getRunAdvance()
45 if (offset < start + count && advances[offset - layoutStart] == 0.0f) { in getRunAdvance()
51 if (advances[nextCluster - layoutStart] != 0.0f) break; in getRunAdvance()
58 advances + (start - layoutStart), buf, start, count, i)) { in getRunAdvance()
72 float getRunAdvance(const float* advances, const uint16_t* buf, size_t start, size_t count, in getRunAdvance() argument
74 return getRunAdvance(advances, buf, start, start, count, offset); in getRunAdvance()
85 size_t getOffsetForAdvance(const float* advances, const uint16_t* buf, size_t start, size_t count, in getOffsetForAdvance() argument
90 if (GraphemeBreak::isGraphemeBreak(advances, buf, start, count, i)) { in getOffsetForAdvance()
94 float width = advances[i - start]; in getOffsetForAdvance()
[all …]
DGraphemeBreak.cpp59 bool GraphemeBreak::isGraphemeBreak(const float* advances, const uint16_t* buf, size_t start, in isGraphemeBreak() argument
113 const bool c2_has_advance = (advances != nullptr && advances[offset - start] != 0.0); in isGraphemeBreak()
172 if (advances != nullptr) { in isGraphemeBreak()
205 size_t GraphemeBreak::getTextRunCursor(const float* advances, const uint16_t* buf, size_t start, in getTextRunCursor() argument
214 while (!isGraphemeBreak(advances, buf, start, count, offset)) { in getTextRunCursor()
224 while (!isGraphemeBreak(advances, buf, start, count, offset)) { in getTextRunCursor()
229 if (!isGraphemeBreak(advances, buf, start, count, offset)) { in getTextRunCursor()
DLayout.cpp568 const std::shared_ptr<FontCollection>& collection, float* advances) { in measureText() argument
577 float* advancesForRun = advances ? advances + (runInfo.mRunStart - start) : advances; in measureText()
588 const std::shared_ptr<FontCollection>& collection, Layout* layout, float* advances) { in doLayoutRunCached() argument
610 advances ? advances + (iter - start) : advances); in doLayoutRunCached()
632 advances ? advances + (bufStart - start) : advances); in doLayoutRunCached()
641 const std::shared_ptr<FontCollection>& collection, Layout* layout, float* advances) { in doLayoutWord() argument
654 if (advances) { in doLayoutWord()
655 layoutForWord.getAdvances(advances); in doLayoutWord()
663 if (advances) { in doLayoutWord()
664 layoutForWord->getAdvances(advances); in doLayoutWord()
[all …]
/frameworks/layoutlib/bridge/src/android/graphics/
DBidiRenderer.java98 public RectF renderText(int start, int limit, int bidiFlags, float[] advances, in renderText() argument
105 renderText(visualRun.getStart(), visualRun.getLimit(), isRtl, advances, in renderText() local
126 public RectF renderText(int start, int limit, boolean isRtl, float[] advances, in renderText() argument
133 renderScript(run.start, run.limit, run.font, flag, advances, advancesIndex, draw); in renderText()
145 float[] advances, int advancesIndex, boolean draw) { in renderScript() argument
155 render(start, limit, preferredFont, flag, advances, advancesIndex, draw); in renderScript()
160 render(start, canDisplayUpTo, preferredFont, flag, advances, advancesIndex, draw); in renderScript()
178 render(start, start+charCount, font, flag, advances, advancesIndex, draw); in renderScript()
190 render(start, start + charCount, preferredFont, flag, advances, advancesIndex, in renderScript()
208 private void render(int start, int limit, Font font, int flag, float[] advances, in render() argument
[all …]
DPaint_Delegate.java933 int bidiFlags, float[] advances, int advancesIndex) { in nGetTextAdvances() argument
935 if (advances != null) in nGetTextAdvances()
937 advances[i]=0; in nGetTextAdvances()
949 RectF bounds = delegate.measureText(text, index, count, advances, advancesIndex, bidiFlags); in nGetTextAdvances()
956 int bidiFlags, float[] advances, int advancesIndex) { in nGetTextAdvances() argument
963 contextStart, contextEnd - contextStart, bidiFlags, advances, advancesIndex); in nGetTextAdvances()
1130 float[] advances = new float[count]; in nGetRunAdvance() local
1133 contextStart, contextEnd - contextStart, bidiFlags, advances, 0); in nGetRunAdvance()
1137 sum += advances[i]; in nGetRunAdvance()
1147 float[] advances = new float[count]; in nGetOffsetForAdvance() local
[all …]
/frameworks/minikin/tests/stresstest/
DMultithreadTest.cpp81 std::vector<float> advances(text.size()); in thread_main() local
82 layout.getAdvances(advances.data()); in thread_main()
83 for (size_t k = 0; k < advances.size(); ++k) { in thread_main()
85 LOG_ALWAYS_FATAL_IF(advances[k] != 10.0f, "Memory corruption detected."); in thread_main()
/frameworks/minikin/include/minikin/
DLayout.h80 const std::shared_ptr<FontCollection>& collection, float* advances);
94 void getAdvances(float* advances);
119 const std::shared_ptr<FontCollection>& collection, Layout* layout, float* advances);
124 const std::shared_ptr<FontCollection>& collection, Layout* layout, float* advances);
DMeasurement.h24 float getRunAdvance(const float* advances, const uint16_t* buf, size_t start, size_t count,
27 size_t getOffsetForAdvance(const float* advances, const uint16_t* buf, size_t start, size_t count,
DGraphemeBreak.h36 static bool isGraphemeBreak(const float* advances, const uint16_t* buf, size_t start,
41 static size_t getTextRunCursor(const float* advances, const uint16_t* buf, size_t start,
/frameworks/base/graphics/java/android/graphics/
DPaint.java2268 int contextIndex, int contextCount, boolean isRtl, float[] advances, in getTextRunAdvances() argument
2278 | (advances == null ? 0 : in getTextRunAdvances()
2279 (advances.length - (advancesIndex + count)))) < 0) { in getTextRunAdvances()
2288 contextIndex, contextCount, isRtl ? BIDI_FORCE_RTL : BIDI_FORCE_LTR, advances, in getTextRunAdvances()
2295 contextIndex, contextCount, isRtl ? BIDI_FORCE_RTL : BIDI_FORCE_LTR, advances, in getTextRunAdvances()
2299 if (advances != null) { in getTextRunAdvances()
2301 advances[i] *= mInvCompatScaling; in getTextRunAdvances()
2315 int contextStart, int contextEnd, boolean isRtl, float[] advances, in getTextRunAdvances() argument
2323 | (advances == null ? 0 : in getTextRunAdvances()
2324 (advances.length - advancesIndex - (end - start)))) < 0) { in getTextRunAdvances()
[all …]
/frameworks/base/core/tests/coretests/src/android/text/
DStaticLayoutLineBreakingTest.java54 int contextIndex, int contextCount, boolean isRtl, float[] advances, in getTextRunAdvances() argument
66 | (advances == null ? 0 : in getTextRunAdvances()
67 (advances.length - (advancesIndex + count)))) < 0) { in getTextRunAdvances()
73 if (advances != null) { in getTextRunAdvances()
76 advances[advancesIndex + i] = width; in getTextRunAdvances()
/frameworks/base/libs/hwui/hwui/
DMinikinUtils.cpp68 const uint16_t* buf, size_t start, size_t count, size_t bufSize, float *advances) { in measureText() argument
73 minikinPaint, resolvedTypeface->fFontCollection, advances); in measureText()
DMinikinUtils.h45 const uint16_t* buf, size_t start, size_t count, size_t bufSize, float *advances);
/frameworks/base/core/java/android/text/
DGraphicsOperations.java56 boolean isRtl, float[] advances, int advancesIndex, Paint paint); in getTextRunAdvances() argument
DSpannableStringBuilder.java1499 float[] advances, int advancesPos, Paint p) { in getTextRunAdvances() argument
1508 isRtl, advances, advancesPos); in getTextRunAdvances()
1511 contextStart + mGapLength, contextLen, isRtl, advances, advancesPos); in getTextRunAdvances()
1516 0, contextLen, isRtl, advances, advancesPos); in getTextRunAdvances()
/frameworks/base/core/jni/android/graphics/
DPaint.cpp186 jfloatArray advances, jint advancesIndex) { in doTextAdvances() argument
196 if (advances) { in doTextAdvances()
197 size_t advancesLength = env->GetArrayLength(advances); in doTextAdvances()
204 if (advances) { in doTextAdvances()
209 if (advances) { in doTextAdvances()
210 env->SetFloatArrayRegion(advances, advancesIndex, count, advancesArray.get()); in doTextAdvances()
218 jint bidiFlags, jfloatArray advances, jint advancesIndex) { in getTextAdvances___CIIIII_FI() argument
223 index - contextIndex, count, contextCount, bidiFlags, advances, advancesIndex); in getTextAdvances___CIIIII_FI()
231 jfloatArray advances, jint advancesIndex) { in getTextAdvances__StringIIIII_FI() argument
237 advances, advancesIndex); in getTextAdvances__StringIIIII_FI()
/frameworks/base/core/java/android/widget/
DTextView.java11786 int contextEnd, boolean isRtl, float[] advances, int advancesIndex, in getTextRunAdvances() argument
11791 contextStart + mStart, contextCount, isRtl, advances, in getTextRunAdvances()