Home
last modified time | relevance | path

Searched refs:positions (Results 1 – 25 of 56) sorted by relevance

123

/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/widget/
DPlaybackTransportRowPresenterTest.java113 PlaybackSeekDataProvider provider, long[] positions) { in verifyGetThumbCalls() argument
115 int lastThumbIndex = Math.min(lastHeroIndex + (mNumbThumbs / 2), positions.length - 1); in verifyGetThumbCalls()
134 void verifyAtHeroIndex(long[] positions, int heroIndex) { in verifyAtHeroIndex() argument
135 verifyAtHeroIndex(positions, heroIndex, null); in verifyAtHeroIndex()
138 void verifyAtHeroIndex(long[] positions, int heroIndex, Bitmap[] thumbs) { in verifyAtHeroIndex() argument
139 assertEquals(positions[heroIndex], mGlue.getControlsRow().getCurrentPosition()); in verifyAtHeroIndex()
143 int end = Math.min(positions.length - 1, mViewHolder.mThumbHeroIndex + mNumbThumbs / 2); in verifyAtHeroIndex()
330 final long[] positions = provider.getSeekPositions(); in seekAndConfirm() local
336 verifyAtHeroIndex(positions, 1); in seekAndConfirm()
338 verifyAtHeroIndex(positions, 2); in seekAndConfirm()
[all …]
/frameworks/base/libs/hwui/
DGradientCache.h40 positions = nullptr; in GradientCacheEntry()
43 GradientCacheEntry(uint32_t* colors, float* positions, uint32_t count) { in GradientCacheEntry()
44 copy(colors, positions, count); in GradientCacheEntry()
48 copy(entry.colors.get(), entry.positions.get(), entry.count); in GradientCacheEntry()
53 copy(entry.colors.get(), entry.positions.get(), entry.count);
72 std::unique_ptr<float[]> positions; member
76 void copy(uint32_t* colors, float* positions, uint32_t count) { in copy()
79 this->positions.reset(new float[count]); in copy()
82 memcpy(this->positions.get(), positions, count * sizeof(float)); in copy()
120 Texture* get(uint32_t* colors, float* positions, int count);
[all …]
DTextDropShadowCache.h38 flags(0), italicStyle(0.0f), scaleX(0), glyphs(nullptr), positions(nullptr) { in ShadowText()
43 const float* positions) in ShadowText()
52 , positions(positions) { in ShadowText()
73 if (positions != nullptr) { in copyTextLocally()
75 positionsCopy.appendArray(positions, glyphCount * 2); in copyTextLocally()
76 positions = positionsCopy.array(); in copyTextLocally()
88 const float* positions; member
134 int numGlyphs, float radius, const float* positions);
DTextDropShadowCache.cpp44 if (positions) { in hash()
46 hash = JenkinsHashMix(hash, android::hash_type(positions[i])); in hash()
82 if (lhs.positions != rhs.positions) { in compare()
83 if (!lhs.positions) return -1; in compare()
84 if (!rhs.positions) return +1; in compare()
86 return memcmp(lhs.positions, rhs.positions, lhs.glyphCount * sizeof(float) * 2); in compare()
149 float radius, const float* positions) { in get() argument
150 ShadowText entry(paint, radius, numGlyphs, glyphs, positions); in get()
157 radius, positions); in get()
DGradientCache.cpp47 hash = JenkinsHashMix(hash, android::hash_type(positions[i])); in hash()
59 return memcmp(lhs.positions.get(), rhs.positions.get(), lhs.count * sizeof(float)); in compare()
110 Texture* GradientCache::get(uint32_t* colors, float* positions, int count) { in get() argument
111 GradientCacheEntry gradient(colors, positions, count); in get()
115 texture = addLinearGradient(gradient, colors, positions, count); in get()
149 uint32_t* colors, float* positions, int count) { in addLinearGradient() argument
167 generateTexture(colors, positions, info.width, 2, texture); in addLinearGradient()
218 void GradientCache::generateTexture(uint32_t* colors, float* positions, in generateTexture() argument
239 float startPos = positions[0]; in generateTexture()
240 float distance = positions[1] - startPos; in generateTexture()
[all …]
DSkiaCanvasProxy.cpp318 auto glyphFunc = [&] (uint16_t* text, float* positions) { in onDrawText() argument
322 positions[posIndex++] = xBaseline; in onDrawText()
323 positions[posIndex++] = yBaseline; in onDrawText()
328 positions[posIndex++] = xBaseline; in onDrawText()
330 positions[posIndex++] = yPosition; in onDrawText()
336 positions[posIndex++] = xPosition; in onDrawText()
337 positions[posIndex++] = yBaseline; in onDrawText()
373 auto glyphFunc = [&] (uint16_t* text, float* positions) { in onDrawPosText() argument
376 memcpy(positions, pos, 2*glyphs.count*sizeof(float)); in onDrawPosText()
379 positions[posIndex++] = pos[i].fX - x; in onDrawPosText()
[all …]
/frameworks/layoutlib/bridge/src/android/graphics/
DGradient_Delegate.java50 protected Gradient_Delegate(long nativeMatrix, int colors[], float positions[]) { in Gradient_Delegate() argument
54 if (positions == null) { in Gradient_Delegate()
56 positions = new float[colors.length]; in Gradient_Delegate()
57 positions[0] = 0.f; in Gradient_Delegate()
58 positions[colors.length - 1] = 1.f; in Gradient_Delegate()
60 positions[i] = spacing * i; in Gradient_Delegate()
63 assert colors.length == positions.length : in Gradient_Delegate()
68 mPositions = positions; in Gradient_Delegate()
84 protected GradientPaint(int[] colors, float[] positions, TileMode tileMode) { in GradientPaint() argument
86 mPositions = positions; in GradientPaint()
DSweepGradient_Delegate.java56 positions[]) { in nativeCreate1() argument
58 positions); in nativeCreate1()
86 int colors[], float positions[]) { in SweepGradient_Delegate() argument
87 super(nativeMatrix, colors, positions); in SweepGradient_Delegate()
97 float[] positions) { in SweepGradientPaint() argument
98 super(colors, positions, null /*tileMode*/); in SweepGradientPaint()
DRadialGradient_Delegate.java60 int colors[], float positions[], int tileMode) { in nativeCreate1() argument
62 colors, positions, Shader_Delegate.getTileMode(tileMode)); in nativeCreate1()
91 int colors[], float positions[], TileMode tile) { in RadialGradient_Delegate() argument
92 super(nativeMatrix, colors, positions); in RadialGradient_Delegate()
103 int[] colors, float[] positions, TileMode mode) { in RadialGradientPaint() argument
104 super(colors, positions, mode); in RadialGradientPaint()
DLinearGradient_Delegate.java61 int colors[], float positions[], int tileMode) { in nativeCreate1() argument
63 x1, y1, colors, positions, Shader_Delegate.getTileMode(tileMode)); in nativeCreate1()
92 float y1, int colors[], float positions[], TileMode tile) { in LinearGradient_Delegate() argument
93 super(nativeMatrix, colors, positions); in LinearGradient_Delegate()
112 float positions[], TileMode tile) { in LinearGradientPaint() argument
113 super(colors, positions, tile); in LinearGradientPaint()
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/widget/
DCacheUtils.java51 static void verifyCacheContainsPositions(RecyclerView view, Integer... positions) { in verifyCacheContainsPositions() argument
52 for (Integer position : positions) { in verifyCacheContainsPositions()
62 static void verifyCacheContainsPrefetchedPositions(RecyclerView view, Integer... positions) { in verifyCacheContainsPrefetchedPositions() argument
63 verifyCacheContainsPositions(view, positions); in verifyCacheContainsPrefetchedPositions()
65 for (Integer position : positions) { in verifyCacheContainsPrefetchedPositions()
68 assertEquals(positions.length, view.mRecycler.mCachedViews.size()); in verifyCacheContainsPrefetchedPositions()
74 static void verifyCacheDoesNotContainPositions(RecyclerView view, Integer... positions) { in verifyCacheDoesNotContainPositions() argument
75 for (Integer position : positions) { in verifyCacheDoesNotContainPositions()
DStaggeredGridLayoutManagerCacheTest.java79 int[] positions = new int[mConfig.mSpanCount]; in findFirstVisibleItemPosition() local
80 mLayoutManager.findFirstVisibleItemPositions(positions); in findFirstVisibleItemPosition()
81 Arrays.sort(positions); in findFirstVisibleItemPosition()
82 return positions[0]; in findFirstVisibleItemPosition()
86 int[] positions = new int[mConfig.mSpanCount]; in findLastVisibleItemPosition() local
87 mLayoutManager.findLastVisibleItemPositions(positions); in findLastVisibleItemPosition()
88 Arrays.sort(positions); in findLastVisibleItemPosition()
89 return positions[mConfig.mSpanCount - 1]; in findLastVisibleItemPosition()
/frameworks/base/graphics/java/android/graphics/
DSweepGradient.java56 @NonNull @ColorInt int colors[], @Nullable float positions[]) { in SweepGradient() argument
60 if (positions != null && colors.length != positions.length) { in SweepGradient()
68 mPositions = positions != null ? positions.clone() : null; in SweepGradient()
115 int colors[], float positions[]); in nativeCreate1() argument
DLinearGradient.java59 @Nullable float positions[], @NonNull TileMode tile) { in LinearGradient() argument
63 if (positions != null && colors.length != positions.length) { in LinearGradient()
72 mPositions = positions != null ? positions.clone() : null; in LinearGradient()
130 int colors[], float positions[], int tileMode); in nativeCreate1() argument
/frameworks/native/include/input/
DVelocityTracker.h83 void addMovement(nsecs_t eventTime, BitSet32 idBits, const Position* positions);
131 const VelocityTracker::Position* positions) = 0;
163 const VelocityTracker::Position* positions);
178 VelocityTracker::Position positions[MAX_POINTERS]; member
181 return positions[idBits.getIndexOfBit(id)]; in getPosition()
206 const VelocityTracker::Position* positions);
240 const VelocityTracker::Position* positions);
256 VelocityTracker::Position positions[MAX_POINTERS]; member
259 return positions[idBits.getIndexOfBit(id)]; in getPosition()
/frameworks/support/design/base/android/support/design/widget/
DCircularBorderDrawable.java197 final float[] positions = new float[6]; in createGradientShader() local
198 positions[0] = 0f; in createGradientShader()
199 positions[1] = borderRatio; in createGradientShader()
200 positions[2] = 0.5f; in createGradientShader()
201 positions[3] = 0.5f; in createGradientShader()
202 positions[4] = 1f - borderRatio; in createGradientShader()
203 positions[5] = 1f; in createGradientShader()
208 colors, positions, in createGradientShader()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DGradientStopsActivity.java46 float[] positions = new float[] { 0.3f, 0.6f }; in onDraw() local
48 colors, positions, Shader.TileMode.CLAMP); in onDraw()
56 positions = new float[] { 0.3f, 0.6f, 1.0f }; in onDraw()
58 colors, positions, Shader.TileMode.CLAMP); in onDraw()
66 positions = new float[] { 0.0f, 0.3f, 0.6f }; in onDraw()
68 colors, positions, Shader.TileMode.CLAMP); in onDraw()
/frameworks/native/libs/input/
DVelocityTracker.cpp221 void VelocityTracker::addMovement(nsecs_t eventTime, BitSet32 idBits, const Position* positions) { in addMovement() argument
243 mStrategy->addMovement(eventTime, idBits, positions); in addMovement()
256 id, positions[index].x, positions[index].y, in addMovement()
314 Position positions[pointerCount]; in addMovement() local
321 positions[index].x = event->getHistoricalX(i, h); in addMovement()
322 positions[index].y = event->getHistoricalY(i, h); in addMovement()
324 addMovement(eventTime, idBits, positions); in addMovement()
330 positions[index].x = event->getX(i); in addMovement()
331 positions[index].y = event->getY(i); in addMovement()
333 addMovement(eventTime, idBits, positions); in addMovement()
[all …]
/frameworks/base/libs/hwui/tests/unit/
DTextDropShadowCacheTests.cpp40 std::vector<float> positions; in RENDERTHREAD_OPENGL_PIPELINE_TEST() local
44 &glyphs, &positions, &totalAdvance, &bounds); in RENDERTHREAD_OPENGL_PIPELINE_TEST()
47 ShadowTexture* texture = cache.get(&paint, glyphs.data(), glyphs.size(), 10, positions.data()); in RENDERTHREAD_OPENGL_PIPELINE_TEST()
DFontRendererTests.cpp40 std::vector<float> positions; in RENDERTHREAD_OPENGL_PIPELINE_TEST() local
44 &glyphs, &positions, &totalAdvance, &bounds); in RENDERTHREAD_OPENGL_PIPELINE_TEST()
48 radius, positions.data()); in RENDERTHREAD_OPENGL_PIPELINE_TEST()
DGradientCacheTests.cpp32 float positions[] = { 1, 2, 3 }; in RENDERTHREAD_OPENGL_PIPELINE_TEST() local
33 Texture* texture = cache.get(colors, positions, 3); in RENDERTHREAD_OPENGL_PIPELINE_TEST()
/frameworks/base/opengl/java/android/opengl/
DVisibility.java50 float[] positions, int positionsOffset, char[] indices, in visibilityTest() argument
120 public static native void computeBoundingSphere(float[] positions, in computeBoundingSphere() argument
/frameworks/support/v7/recyclerview/tests/src/android/support/v7/util/
DAsyncListUtilTest.java148 private void scrollAndExpectTiles(int position, String context, int... positions) in scrollAndExpectTiles() argument
150 mDataCallback.expectTiles(positions); in scrollAndExpectTiles()
218 public void expectTiles(int... positions) { in expectTiles() argument
220 mTilesFilledLatch.expect(positions); in expectTiles()
318 void expect(int ... positions) { in expect() argument
320 for (int position : positions) { in expect()
/frameworks/rs/tests/java_api/RsNbody/src/com/example/android/rs/nbody_gl/
Dnbody.rs9 rs_allocation positions; // float4
23 rsSetElementAt_float4(positions, ctr_pos, 0);
57 int dimx = rsAllocationGetDimX(positions);
59 float4 mass = rsGetElementAt_float4(positions, i);
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DGrid.java462 public void fillDisappearingItems(int[] positions, int positionsLength, in fillDisappearingItems() argument
466 ? Arrays.binarySearch(positions, 0, positionsLength, lastPos) : 0; in fillDisappearingItems()
477 int disappearingIndex = positions[i]; in fillDisappearingItems()
494 ? Arrays.binarySearch(positions, 0, positionsLength, firstPos) : 0; in fillDisappearingItems()
505 int disappearingIndex = positions[i]; in fillDisappearingItems()

123