Home
last modified time | relevance | path

Searched refs:coords (Results 1 – 25 of 87) sorted by relevance

1234

/frameworks/av/services/camera/libcameraservice/device3/
DDistortionMapper.cpp291 quad->coords[0], quad->coords[1], in mapRawToCorrected()
292 quad->coords[2], quad->coords[3], in mapRawToCorrected()
293 quad->coords[4], quad->coords[5], in mapRawToCorrected()
294 quad->coords[6], quad->coords[7]); in mapRawToCorrected()
302 corrQuad->coords[0], corrQuad->coords[1], in mapRawToCorrected()
303 corrQuad->coords[2], corrQuad->coords[3], in mapRawToCorrected()
304 corrQuad->coords[4], corrQuad->coords[5], in mapRawToCorrected()
305 corrQuad->coords[6], corrQuad->coords[7]); in mapRawToCorrected()
313 float corrX = corrQuad->coords[0] + u * (corrQuad->coords[2] - corrQuad->coords[0]); in mapRawToCorrected()
315 float corrY = corrQuad->coords[1] + v * (corrQuad->coords[7] - corrQuad->coords[1]); in mapRawToCorrected()
[all …]
/frameworks/native/services/inputflinger/reader/mapper/gestures/
DGestureConverter.cpp210 PointerCoords coords; in handleMove() local
211 coords.clear(); in handleMove()
212 coords.setAxisValue(AMOTION_EVENT_AXIS_RELATIVE_X, deltaX); in handleMove()
213 coords.setAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y, deltaY); in handleMove()
214 coords.setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, down ? 1.0f : 0.0f); in handleMove()
218 /*pointerCount=*/1, &coords)); in handleMove()
226 PointerCoords coords; in handleButtonsChange() local
227 coords.clear(); in handleButtonsChange()
228 coords.setAxisValue(AMOTION_EVENT_AXIS_RELATIVE_X, 0); in handleButtonsChange()
229 coords.setAxisValue(AMOTION_EVENT_AXIS_RELATIVE_Y, 0); in handleButtonsChange()
[all …]
/frameworks/native/services/inputflinger/reader/mapper/
DCapturedTouchpadEventConverter.cpp165 std::vector<PointerCoords> coords; in sync() local
178 coordsIndexForSlotNumber[slotNumber] = coords.size(); in sync()
179 coords.push_back(makePointerCoordsForSlot(mMotionAccumulator.getSlot(slotNumber))); in sync()
183 makeMotionArgs(when, readTime, AMOTION_EVENT_ACTION_MOVE, coords, properties)); in sync()
204 if (coords.size() - upSlots.size() + downSlots.size() == 0) { in sync()
220 coords, properties, /*actionButton=*/button)); in sync()
229 if (coords.size() == 1) { in sync()
234 out.push_back(makeMotionArgs(when, readTime, action, coords, properties, /*actionButton=*/0, in sync()
238 coords.erase(coords.begin() + indexToRemove); in sync()
252 const size_t coordsIndex = coords.size(); in sync()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/
DMotionEventUtils.java33 MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords(); in createRotaryEvent() local
34 coords.setAxisValue(AXIS_SCROLL, scroll); in createRotaryEvent()
36 return createGenericMotionEvent(SOURCE_ROTARY_ENCODER, ACTION_SCROLL, coords); in createRotaryEvent()
41 MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords(); in createGenericPointerEvent() local
42 coords.setAxisValue(AXIS_HSCROLL, hScroll); in createGenericPointerEvent()
43 coords.setAxisValue(AXIS_VSCROLL, vScroll); in createGenericPointerEvent()
45 return createGenericMotionEvent(SOURCE_CLASS_POINTER, ACTION_SCROLL, coords); in createGenericPointerEvent()
49 int source, int action, MotionEvent.PointerCoords coords) { in createGenericMotionEvent() argument
59 new MotionEvent.PointerCoords[] {coords}, in createGenericMotionEvent()
/frameworks/base/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/
DGestureHelper.java194 @NonNull PointerCoords[] coords, long downTime, int index) { in nonPrimaryPointerDown() argument
196 if (props.length != coords.length || coords.length < 2) { in nonPrimaryPointerDown()
203 + (index << MotionEvent.ACTION_POINTER_INDEX_SHIFT), coords.length, props, coords); in nonPrimaryPointerDown()
209 @NonNull PointerCoords[] coords, @NonNull Tuple[] endPoints, long downTime, int steps) { in movePointers() argument
211 if (props.length != coords.length || coords.length != endPoints.length) { in movePointers()
221 Tuple[] startPoints = new Tuple[coords.length]; in movePointers()
223 for (int i = 0; i < coords.length; i++) { in movePointers()
224 startPoints[i] = new Tuple(coords[i].x, coords[i].y); in movePointers()
235 for (int j = 0; j < coords.length; j++) { in movePointers()
236 coords[j].x += (endPoints[j].x - startPoints[j].x) / steps; in movePointers()
[all …]
/frameworks/native/services/inputflinger/tests/
DInputProcessorConverter_test.cpp34 PointerCoords coords; in generateBasicMotionArgs() local
35 coords.clear(); in generateBasicMotionArgs()
36 coords.setAxisValue(AMOTION_EVENT_AXIS_X, 1); in generateBasicMotionArgs()
37 coords.setAxisValue(AMOTION_EVENT_AXIS_Y, 2); in generateBasicMotionArgs()
38 coords.setAxisValue(AMOTION_EVENT_AXIS_SIZE, 0.5); in generateBasicMotionArgs()
45 /*pointerCount=*/1, &properties, &coords, /*xPrecision=*/0, in generateBasicMotionArgs()
52 static float getMotionEventAxis(common::PointerCoords coords, common::Axis axis) { in getMotionEventAxis() argument
53 uint32_t index = BitSet64::getIndexOfBit(static_cast<uint64_t>(coords.bits), in getMotionEventAxis()
55 return coords.values[index]; in getMotionEventAxis()
DInputMapperTest.cpp238 void assertPointerCoords(const PointerCoords& coords, float x, float y, float pressure, float size, in assertPointerCoords() argument
241 ASSERT_NEAR(x, coords.getAxisValue(AMOTION_EVENT_AXIS_X), scaledAxisEpsilon); in assertPointerCoords()
242 ASSERT_NEAR(y, coords.getAxisValue(AMOTION_EVENT_AXIS_Y), scaledAxisEpsilon); in assertPointerCoords()
243 ASSERT_NEAR(pressure, coords.getAxisValue(AMOTION_EVENT_AXIS_PRESSURE), EPSILON); in assertPointerCoords()
244 ASSERT_NEAR(size, coords.getAxisValue(AMOTION_EVENT_AXIS_SIZE), EPSILON); in assertPointerCoords()
245 ASSERT_NEAR(touchMajor, coords.getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MAJOR), scaledAxisEpsilon); in assertPointerCoords()
246 ASSERT_NEAR(touchMinor, coords.getAxisValue(AMOTION_EVENT_AXIS_TOUCH_MINOR), scaledAxisEpsilon); in assertPointerCoords()
247 ASSERT_NEAR(toolMajor, coords.getAxisValue(AMOTION_EVENT_AXIS_TOOL_MAJOR), scaledAxisEpsilon); in assertPointerCoords()
248 ASSERT_NEAR(toolMinor, coords.getAxisValue(AMOTION_EVENT_AXIS_TOOL_MINOR), scaledAxisEpsilon); in assertPointerCoords()
249 ASSERT_NEAR(orientation, coords.getAxisValue(AMOTION_EVENT_AXIS_ORIENTATION), EPSILON); in assertPointerCoords()
[all …]
/frameworks/base/opengl/java/javax/microedition/khronos/opengles/
DGL11Ext.java55 float[] coords, in glDrawTexfvOES() argument
60 java.nio.FloatBuffer coords in glDrawTexfvOES() argument
72 int[] coords, in glDrawTexivOES() argument
77 java.nio.IntBuffer coords in glDrawTexivOES() argument
89 short[] coords, in glDrawTexsvOES() argument
94 java.nio.ShortBuffer coords in glDrawTexsvOES() argument
106 int[] coords, in glDrawTexxvOES() argument
111 java.nio.IntBuffer coords in glDrawTexxvOES() argument
/frameworks/native/libs/input/tests/
DInputVerifier_test.cpp40 std::vector<PointerCoords> coords; in TEST() local
41 coords.push_back({}); in TEST()
42 coords.back().clear(); in TEST()
43 coords.back().setAxisValue(AMOTION_EVENT_AXIS_X, 75); in TEST()
44 coords.back().setAxisValue(AMOTION_EVENT_AXIS_Y, 300); in TEST()
50 coords.data(), /*flags=*/0); in TEST()
DInputEvent_test.cpp77 PointerCoords coords; in TEST_F() local
78 coords.clear(); in TEST_F()
80 ASSERT_EQ(0ULL, coords.bits); in TEST_F()
81 ASSERT_FALSE(coords.isResampled); in TEST_F()
85 PointerCoords coords; in TEST_F() local
86 coords.clear(); in TEST_F()
89 ASSERT_EQ(0, coords.getAxisValue(0)) in TEST_F()
91 ASSERT_EQ(0, coords.getAxisValue(1)) in TEST_F()
95 ASSERT_EQ(OK, coords.setAxisValue(1, 5)); in TEST_F()
96 ASSERT_EQ(5, coords.values[0]); in TEST_F()
[all …]
/frameworks/av/services/camera/libcameraservice/tests/
DDistortionMapperTest.cpp134 auto coords = basicCoords; in TEST() local
136 res = m.mapCorrectedToRaw(coords.data(), 5, mapperInfo, /*clamp*/true); in TEST()
139 for (size_t i = 0; i < coords.size(); i++) { in TEST()
140 EXPECT_EQ(coords[i], basicCoords[i]); in TEST()
143 res = m.mapRawToCorrected(coords.data(), 5, mapperInfo, /*clamp*/true); in TEST()
146 for (size_t i = 0; i < coords.size(); i++) { in TEST()
147 EXPECT_EQ(coords[i], basicCoords[i]); in TEST()
206 auto coords = basicCoords; in TEST() local
208 res = m.mapCorrectedToRaw(coords.data(), 5, mapperInfo, /*clamp*/true, /*simple*/true); in TEST()
211 ASSERT_EQ(coords[0], 0); ASSERT_EQ(coords[1], 0); in TEST()
[all …]
DZoomRatioTest.cpp182 auto coords = originalCoords; in subScaleCoordinatesTest() local
183 mapper.scaleCoordinates(coords.data(), coords.size()/2, 1.0f, false /*clamp*/, width, height); in subScaleCoordinatesTest()
184 for (size_t i = 0; i < coords.size(); i++) { in subScaleCoordinatesTest()
185 EXPECT_EQ(coords[i], originalCoords[i]); in subScaleCoordinatesTest()
199 coords = originalCoords; in subScaleCoordinatesTest()
200 mapper.scaleCoordinates(coords.data(), coords.size()/2, 2.0f, false /*clamp*/, width, height); in subScaleCoordinatesTest()
201 for (size_t i = 0; i < coords.size(); i++) { in subScaleCoordinatesTest()
202 EXPECT_LE(std::abs(coords[i] - expected2xCoords[i]), kMaxAllowedPixelError); in subScaleCoordinatesTest()
216 coords = originalCoords; in subScaleCoordinatesTest()
217 mapper.scaleCoordinates(coords.data(), coords.size()/2, 2.0f, true /*clamp*/, width, height); in subScaleCoordinatesTest()
[all …]
/frameworks/base/core/tests/coretests/src/android/view/
DMotionEventTest.java52 final var coords = new PointerCoords(); in pointerCoords() local
53 coords.x = x; in pointerCoords()
54 coords.y = y; in pointerCoords()
55 return coords; in pointerCoords()
69 final var coords = new PointerCoords[]{pointerCoords(10, 20)}; in testObtainWithDisplayId() local
73 pointerCount, properties, coords, in testObtainWithDisplayId()
93 pointerCount, properties, coords, in testObtainWithDisplayId()
134 final var coords = new PointerCoords[]{pointerCoords(20, 60), pointerCoords(40, 40)}; in testCalculatesCursorPositionForMultiTouchMouseEvents() local
137 0 /* eventTime */, ACTION_POINTER_DOWN, pointerCount, properties, coords, in testCalculatesCursorPositionForMultiTouchMouseEvents()
241 final var coords = new PointerCoords[]{pointerCoords(20, 60), pointerCoords(40, 40)}; in testSplit() local
[all …]
DRotaryScrollHapticsTest.java231 MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords(); in createRotaryEvent() local
232 coords.setAxisValue(AXIS_SCROLL, scroll); in createRotaryEvent()
235 TEST_ROTARY_DEVICE_ID, SOURCE_ROTARY_ENCODER, ACTION_SCROLL, coords); in createRotaryEvent()
239 MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords(); in createGenericPointerEvent() local
240 coords.setAxisValue(AXIS_HSCROLL, hScroll); in createGenericPointerEvent()
241 coords.setAxisValue(AXIS_VSCROLL, vScroll); in createGenericPointerEvent()
244 TEST_RANDOM_DEVICE_ID, SOURCE_CLASS_POINTER, ACTION_SCROLL, coords); in createGenericPointerEvent()
248 int deviceId, int source, int action, MotionEvent.PointerCoords coords) { in createGenericMotionEvent() argument
255 new MotionEvent.PointerCoords[] {coords}, in createGenericMotionEvent()
DViewGroupTest.java73 MotionEvent.PointerCoords[] coords = new MotionEvent.PointerCoords[2]; in testDispatchMouseEventsUnderCursor() local
74 coords[0] = new MotionEvent.PointerCoords(); in testDispatchMouseEventsUnderCursor()
75 coords[0].x = 80; in testDispatchMouseEventsUnderCursor()
76 coords[0].y = 50; in testDispatchMouseEventsUnderCursor()
77 coords[1] = new MotionEvent.PointerCoords(); in testDispatchMouseEventsUnderCursor()
78 coords[1].x = 240; in testDispatchMouseEventsUnderCursor()
79 coords[1].y = 50; in testDispatchMouseEventsUnderCursor()
85 2 /* pointerCount */, properties, coords, 0 /* metaState */, 0 /* buttonState */, in testDispatchMouseEventsUnderCursor()
100 2 /* pointerCount */, properties, coords, 0 /* metaState */, 0 /* buttonState */, in testDispatchMouseEventsUnderCursor()
/frameworks/minikin/tests/unittest/
DFontTest.cpp160 const float* coords = hb_font_get_var_coords_design(hbFont.get(), &length); in TEST() local
162 EXPECT_EQ(400, coords[0]); in TEST()
163 EXPECT_EQ(0, coords[1]); in TEST()
172 const float* coords = hb_font_get_var_coords_design(hbFont.get(), &length); in TEST() local
174 EXPECT_EQ(500, coords[0]); in TEST()
175 EXPECT_EQ(0, coords[1]); in TEST()
183 const float* coords = hb_font_get_var_coords_design(hbFont.get(), &length); in TEST() local
185 EXPECT_EQ(400, coords[0]); // 400 is a default value of `wght` axis in TEST()
186 EXPECT_EQ(1, coords[1]); in TEST()
195 const float* coords = hb_font_get_var_coords_design(hbFont.get(), &length); in TEST() local
[all …]
/frameworks/base/services/accessibility/java/com/android/server/accessibility/gestures/
DEventDispatcher.java118 final PointerCoords[] coords = new PointerCoords[event.getPointerCount()]; in sendMotionEvent() local
122 coords[i] = c; in sendMotionEvent()
128 event.getPointerCount(), properties, coords, in sendMotionEvent()
221 PointerCoords[] coords = PointerCoords.createArray(pointerCount); in offsetEvent() local
224 event.getPointerCoords(i, coords[i]); in offsetEvent()
226 coords[i].x += offsetX; in offsetEvent()
227 coords[i].y += offsetY; in offsetEvent()
236 coords, in offsetEvent()
343 MotionEvent.PointerCoords[] coords = new MotionEvent.PointerCoords[pointerCount]; in computeInjectionDownEvent() local
350 coords[i] = new MotionEvent.PointerCoords(); in computeInjectionDownEvent()
[all …]
/frameworks/native/libs/input/
DMotionPredictor.cpp204 const PointerCoords* coords = event.getHistoricalRawPointerCoords(0, i); in record() local
207 .position.x = coords->getAxisValue(AMOTION_EVENT_AXIS_X), in record()
208 .position.y = coords->getAxisValue(AMOTION_EVENT_AXIS_Y), in record()
215 coords->getAxisValue(AMOTION_EVENT_AXIS_X), in record()
216 coords->getAxisValue(AMOTION_EVENT_AXIS_Y)); in record()
300 PointerCoords coords; in predict() local
301 coords.clear(); in predict()
302 coords.setAxisValue(AMOTION_EVENT_AXIS_X, predictedPoint.x); in predict()
303 coords.setAxisValue(AMOTION_EVENT_AXIS_Y, predictedPoint.y); in predict()
304 coords.setAxisValue(AMOTION_EVENT_AXIS_PRESSURE, predictedPressure[i]); in predict()
[all …]
/frameworks/native/services/inputflinger/
DNotifyArgs.cpp118 std::string coords; in dump() local
120 if (!coords.empty()) { in dump()
121 coords += ", "; in dump()
123 coords += StringPrintf("{%" PRIu32 ": ", i); in dump()
124 coords += in dump()
130 coords += StringPrintf(" toolType=%s", ftl::enum_string(toolType).c_str()); in dump()
136 coords += StringPrintf(" major=%.1f minor=%.1f orientation=%.1f", major, minor, in dump()
139 coords += "}"; in dump()
145 coords.c_str(), flags); in dump()
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/common/split/
DDividerViewTest.java103 MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords(); in getMotionEvent() local
104 coords.pressure = 1; in getMotionEvent()
105 coords.size = 1; in getMotionEvent()
106 coords.x = x; in getMotionEvent()
107 coords.y = y; in getMotionEvent()
111 new MotionEvent.PointerCoords[]{coords}, 0, 0, 1.0f, 1.0f, 0, 0, in getMotionEvent()
/frameworks/native/opengl/tools/glgen/specs/jsr239/
Dglspec-1.1ext3 void glDrawTexfvOES ( const GLfloat *coords )
5 void glDrawTexivOES ( const GLint *coords )
7 void glDrawTexsvOES ( const GLshort *coords )
9 void glDrawTexxvOES ( const GLfixed *coords )
/frameworks/base/apct-tests/perftests/core/src/android/input/
DMotionPredictorBenchmark.kt50 val coords = arrayOfNulls<MotionEvent.PointerCoords>(pointerCount) in getStylusMotionEvent() constant
56 coords[i] = PointerCoords() in getStylusMotionEvent()
57 coords[i]!!.x = x in getStylusMotionEvent()
58 coords[i]!!.y = y in getStylusMotionEvent()
62 properties, coords, /*metaState=*/0, /*buttonState=*/0, in getStylusMotionEvent()
/frameworks/native/services/inputflinger/dispatcher/trace/
DAndroidInputEventProtoConverter.cpp68 const auto& coords = event.pointerCoords[i]; in toProtoMotionEvent() local
69 auto bits = BitSet64(coords.bits); in toProtoMotionEvent()
76 axisEntry->set_value(coords.values[axisIndex]); in toProtoMotionEvent()
124 const auto& coords = motion->pointerCoords[i]; in toProtoWindowDispatchEvent() local
127 args.transform, coords); in toProtoWindowDispatchEvent()
128 auto bits = BitSet64(coords.bits); in toProtoWindowDispatchEvent()
132 if (coords.values[axisIndex] != axisValueInWindow) { in toProtoWindowDispatchEvent()
/frameworks/base/tests/Input/src/com/android/test/input/
DMotionPredictorTest.kt53 val coords = arrayOfNulls<MotionEvent.PointerCoords>(pointerCount) in getStylusMotionEvent() constant
59 coords[i] = PointerCoords() in getStylusMotionEvent()
60 coords[i]!!.x = x in getStylusMotionEvent()
61 coords[i]!!.y = y in getStylusMotionEvent()
65 properties, coords, /*metaState=*/0, /*buttonState=*/0, in getStylusMotionEvent()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/
DClassifierTest.java178 MotionEvent.PointerCoords coords = new MotionEvent.PointerCoords(); in getPointerCoords() local
179 coords.pressure = 1; in getPointerCoords()
180 coords.size = 1; in getPointerCoords()
181 coords.x = x; in getPointerCoords()
182 coords.y = y; in getPointerCoords()
183 return coords; in getPointerCoords()

1234