Home
last modified time | relevance | path

Searched refs:pointers (Results 1 – 25 of 46) sorted by relevance

12

/frameworks/native/services/inputflinger/dispatcher/
DTouchedWindow.cpp32 bool hasPointerId(const std::vector<PointerProperties>& pointers, int32_t pointerId) { in hasPointerId() argument
33 return std::find_if(pointers.begin(), pointers.end(), in hasPointerId()
36 }) != pointers.end(); in hasPointerId()
39 bool hasPointerId(const std::vector<TouchedWindow::HoveringPointer>& pointers, int32_t pointerId) { in hasPointerId() argument
40 return std::find_if(pointers.begin(), pointers.end(), in hasPointerId()
43 }) != pointers.end(); in hasPointerId()
103 const std::vector<PointerProperties>& pointers) { in addTouchingPointers() argument
106 for (const PointerProperties& pointer : pointers) { in addTouchingPointers()
112 touchingPointers.insert(touchingPointers.end(), pointers.begin(), pointers.end()); in addTouchingPointers()
114 LOG(ERROR) << __func__ << ": " << dumpVector(pointers, streamableToString) << ", device " in addTouchingPointers()
[all …]
DTouchedWindow.h55 const std::vector<PointerProperties>& pointers);
57 void removeTouchingPointers(DeviceId deviceId, std::bitset<MAX_POINTER_ID + 1> pointers);
/frameworks/native/libs/input/tests/
DTestEventMatchers.h46 std::vector<PointerArgs> pointers{};
146 if (motionEvent.getPointerCount() != mSample.pointers.size()) { in MatchAndExplain()
148 << " expected: " << mSample.pointers.size(); in MatchAndExplain()
157 if ((std::abs(pointerCoords.getX() - mSample.pointers[pointerIndex].x) > in MatchAndExplain()
159 (std::abs(pointerCoords.getY() - mSample.pointers[pointerIndex].y) > in MatchAndExplain()
163 << ") expected: (" << mSample.pointers[pointerIndex].x << ", " in MatchAndExplain()
164 << mSample.pointers[pointerIndex].y << ")"; in MatchAndExplain()
169 mSample.pointers[pointerIndex].isResampled) { in MatchAndExplain()
172 << " expected: " << mSample.pointers[pointerIndex].isResampled; in MatchAndExplain()
DTouchResampling_test.cpp41 std::vector<Pointer> pointers; member
70 const std::vector<Pointer>& pointers);
99 const std::vector<Pointer>& pointers) { in publishSimpleMotionEvent() argument
103 for (const Pointer& pointer : pointers) { in publishSimpleMotionEvent()
125 publishSimpleMotionEvent(entry.action, entry.eventTime.count(), entry.pointers); in publishInputEventEntries()
180 ASSERT_EQ(entry.pointers.size(), motionEvent->getPointerCount()); in consumeInputEventEntries()
185 ssize_t motionEventPointerIndex = motionEvent->findPointerIndex(entry.pointers[p].id); in consumeInputEventEntries()
187 ASSERT_EQ(entry.pointers[p].x, in consumeInputEventEntries()
190 ASSERT_EQ(entry.pointers[p].x, in consumeInputEventEntries()
193 ASSERT_EQ(entry.pointers[p].y, in consumeInputEventEntries()
[all …]
DInputConsumerResampling_test.cpp57 std::vector<Pointer> pointers{}; member
141 for (const Pointer& pointer : entry.pointers) { in nextPointerMessage()
159 EXPECT_EQ(motionEvent->getPointerCount(), expectedEntry.pointers.size()); in assertReceivedMotionEvent()
162 for (size_t pointerIndex = 0; pointerIndex < expectedEntry.pointers.size(); in assertReceivedMotionEvent()
166 motionEvent->findPointerIndex(expectedEntry.pointers[pointerIndex].id); in assertReceivedMotionEvent()
168 expectedEntry.pointers[pointerIndex].x); in assertReceivedMotionEvent()
170 expectedEntry.pointers[pointerIndex].y); in assertReceivedMotionEvent()
172 expectedEntry.pointers[pointerIndex].x); in assertReceivedMotionEvent()
174 expectedEntry.pointers[pointerIndex].y); in assertReceivedMotionEvent()
176 expectedEntry.pointers[pointerIndex].isResampled); in assertReceivedMotionEvent()
DInputPublisherAndConsumer_test.cpp78 PublishMotionArgs(int32_t action, nsecs_t downTime, const std::vector<Pointer>& pointers,
83 const std::vector<Pointer>& pointers, const uint32_t inSeq) in PublishMotionArgs() argument
98 pointerCount = pointers.size(); in PublishMotionArgs()
102 pointerProperties[i].id = pointers[i].id; in PublishMotionArgs()
107 pointerCoords[i].isResampled = pointers[i].isResampled; in PublishMotionArgs()
108 pointerCoords[i].setAxisValue(AMOTION_EVENT_AXIS_X, pointers[i].x); in PublishMotionArgs()
109 pointerCoords[i].setAxisValue(AMOTION_EVENT_AXIS_Y, pointers[i].y); in PublishMotionArgs()
248 const std::vector<Pointer>& pointers);
361 const std::vector<Pointer> pointers = {Pointer{.id = 0, .x = 20, .y = 30}}; in publishAndConsumeBatchedMotionMove() local
362 PublishMotionArgs args(AMOTION_EVENT_ACTION_MOVE, downTime, pointers, seq); in publishAndConsumeBatchedMotionMove()
[all …]
DStructLayout_test.cpp83 CHECK_OFFSET(InputMessage::Body::Motion, pointers, 160); in TestInputMessageAlignment()
122 offsetof(InputMessage::Body::Motion, pointers) + in TestBodySize()
138 offsetof(InputMessage::Body::Motion, pointers) + in TestBodySize()
160 constexpr size_t bodySize = offsetof(InputMessage::Body::Motion, pointers) + in CalculateSinglePointerInputMessageSize()
DInputPublisherAndConsumerNoResampling_test.cpp88 PublishMotionArgs(int32_t action, nsecs_t downTime, const std::vector<Pointer>& pointers,
93 const std::vector<Pointer>& pointers, const uint32_t inSeq) in PublishMotionArgs() argument
108 pointerCount = pointers.size(); in PublishMotionArgs()
112 pointerProperties[i].id = pointers[i].id; in PublishMotionArgs()
117 pointerCoords[i].isResampled = pointers[i].isResampled; in PublishMotionArgs()
118 pointerCoords[i].setAxisValue(AMOTION_EVENT_AXIS_X, pointers[i].x); in PublishMotionArgs()
119 pointerCoords[i].setAxisValue(AMOTION_EVENT_AXIS_Y, pointers[i].y); in PublishMotionArgs()
304 const std::vector<Pointer>& pointers);
672 const std::vector<Pointer> pointers = {Pointer{.id = 0, .x = 20, .y = 30}}; in publishAndConsumeBatchedMotionMove() local
673 PublishMotionArgs args(AMOTION_EVENT_ACTION_MOVE, downTime, pointers, seq); in publishAndConsumeBatchedMotionMove()
[all …]
DVelocityTracker_test.cpp100 BitSet32 pointers; in getValidPointers() local
103 pointers.markBit(i); in getValidPointers()
106 return pointers; in getValidPointers()
109 static uint32_t getChangingPointerId(BitSet32 pointers, BitSet32 otherPointers) { in getChangingPointerId() argument
110 BitSet32 difference(pointers.value ^ otherPointers.value); in getChangingPointerId()
119 BitSet32 pointers = getValidPointers(currentPositions); in resolveAction() local
120 const uint32_t pointerCount = pointers.count(); in resolveAction()
126 uint32_t pointerId = getChangingPointerId(pointers, lastPointers); in resolveAction()
135 uint32_t pointerId = getChangingPointerId(pointers, nextPointers); in resolveAction()
180 BitSet32 pointers = getValidPointers(entry.positions); in createTouchMotionEventStream() local
[all …]
DResampler_test.cpp61 std::vector<Pointer> pointers{}; member
63 explicit InputSample(std::chrono::milliseconds eventTime, const std::vector<Pointer>& pointers) in InputSample()
64 : eventTime{eventTime}, pointers{pointers} {} in InputSample()
79 for (const Pointer& pointer : pointers) { in operator InputMessage()
104 for (const Pointer& pointer : firstSample.pointers) { in operator MotionEvent()
112 std::vector<PointerCoords> pointersCoords{samples[i].pointers.begin(), in operator MotionEvent()
113 samples[i].pointers.end()}; in operator MotionEvent()
/frameworks/native/include/input/
DResampler.h135 for (Pointer& pointer : pointers) { in PointerMap()
145 iterator<Pointer> begin() { return iterator<Pointer>{&pointers[0]}; } in begin()
147 iterator<const Pointer> begin() const { return iterator<const Pointer>{&pointers[0]}; } in begin()
149 iterator<Pointer> end() { return iterator<Pointer>{&pointers[nextPointerIndex]}; } in end()
152 return iterator<const Pointer>{&pointers[nextPointerIndex]}; in end()
162 LOG_IF(FATAL, nextPointerIndex >= pointers.size()) in insert()
167 pointers[nextPointerIndex] = pointer; in insert()
179 return index.has_value() ? std::optional{pointers[*index]} : std::nullopt; in find()
193 std::array<Pointer, MAX_POINTERS + 1> pointers; variable
DInputConsumer.h137 PointerCoords pointers[MAX_POINTERS]; member
143 uint32_t id = msg.body.motion.pointers[i].properties.id; in initializeFrom()
146 pointers[i].copyFrom(msg.body.motion.pointers[i].coords); in initializeFrom()
157 pointers[index].copyFrom(other.pointers[index]); in initializeFrom()
162 const PointerCoords& getPointerById(uint32_t id) const { return pointers[idToIndex[id]]; } in getPointerById()
/frameworks/compile/slang/tests/F_ptr_in_struct/
Dstderr.txt.expect1 ptr_in_struct.rscript:4:8: error: structures containing pointers cannot be used as the type of an e…
2 ptr_in_struct.rscript:10:8: error: structures containing pointers cannot be used as the type of an …
/frameworks/compile/slang/tests/F_reduce_general_bad_result/
Dstderr.txt.expect21 reduce_general_bad_result.rscript:276:28: error: structures containing pointers cannot be used as t…
22 reduce_general_bad_result.rscript:286:31: error: structures containing pointers cannot be used as t…
23 reduce_general_bad_result.rscript:310:28: error: structures containing pointers cannot be used as t…
24 reduce_general_bad_result.rscript:322:31: error: structures containing pointers cannot be used as t…
25 reduce_general_bad_result.rscript:349:33: error: structures containing pointers cannot be used as t…
26 reduce_general_bad_result.rscript:362:36: error: structures containing pointers cannot be used as t…
/frameworks/native/libs/input/
DInputTransport.cpp276 msg->body.motion.pointers[i].properties.id = body.motion.pointers[i].properties.id; in getSanitizedCopy()
277 msg->body.motion.pointers[i].properties.toolType = in getSanitizedCopy()
278 body.motion.pointers[i].properties.toolType, in getSanitizedCopy()
280 msg->body.motion.pointers[i].coords.bits = body.motion.pointers[i].coords.bits; in getSanitizedCopy()
281 const uint32_t count = BitSet64::count(body.motion.pointers[i].coords.bits); in getSanitizedCopy()
282 memcpy(&msg->body.motion.pointers[i].coords.values[0], in getSanitizedCopy()
283 &body.motion.pointers[i].coords.values[0], in getSanitizedCopy()
284 count * (sizeof(body.motion.pointers[i].coords.values[0]))); in getSanitizedCopy()
285 msg->body.motion.pointers[i].coords.isResampled = in getSanitizedCopy()
286 body.motion.pointers[i].coords.isResampled; in getSanitizedCopy()
[all …]
DInputConsumer.cpp108 pointerProperties[i] = msg.body.motion.pointers[i].properties; in initializeMotionEvent()
109 pointerCoords[i] = msg.body.motion.pointers[i].coords; in initializeMotionEvent()
134 pointerCoords[i] = msg.body.motion.pointers[i].coords; in addSample()
550 uint32_t id = msg.body.motion.pointers[i].properties.id; in rewriteMessage()
554 PointerCoords& msgCoords = msg.body.motion.pointers[i].coords; in rewriteMessage()
680 touchState.lastResample.pointers[i] = oldLastResample.getPointerById(id); in resampleTouchState()
684 PointerCoords& resampledCoords = touchState.lastResample.pointers[i]; in resampleTouchState()
700 event->addSample(sampleTime, touchState.lastResample.pointers, event->getId()); in resampleTouchState()
847 if (head.body.motion.pointers[i].properties != msg->body.motion.pointers[i].properties) { in canAddSample()
888 const float x = msg.body.motion.pointers[i].coords.getX(); in dump()
[all …]
/frameworks/compile/slang/tests/F_void_ptr/
Dstderr.txt.expect1 void_ptr.rscript:4:7: error: void pointers cannot be exported: 'v'
/frameworks/compile/slang/tests/F_ptr_to_array/
Dstderr.txt.expect1 ptr_to_array.rscript:4:7: error: pointers to arrays cannot be exported: 'arrayptr'
/frameworks/compile/slang/tests/F_int_ptr_ptr/
Dstderr.txt.expect1 int_ptr_ptr.rscript:4:7: error: multiple levels of pointers cannot be exported: 'myPtr'
/frameworks/compile/slang/tests/F_struct_field_ptr_to_fn_noproto/
Dstderr.txt.expect1 struct_field_ptr_to_fn_noproto.rscript:4:8: error: structures containing pointers cannot be used as…
/frameworks/compile/slang/tests/F_struct_field_ptr_to_array/
Dstderr.txt.expect1 struct_field_ptr_to_array.rscript:4:8: error: structures containing pointers cannot be used as the …
/frameworks/compile/slang/tests/F_struct_field_ptr_to_fn_proto/
Dstderr.txt.expect1 struct_field_ptr_to_fn_proto.rscript:4:8: error: structures containing pointers cannot be used as t…
/frameworks/compile/slang/tests/F_ptr_in_struct_for_call/
Dstderr.txt.expect1 ptr_in_struct_for_call.rscript:8:24: error: structures containing pointers cannot be used as the ty…
/frameworks/compile/slang/tests/F_reduce_general_bad_function/
Dstderr.txt.expect15 …e *') and initializer avi_init() parameter 'accum' (type 'int *') must be pointers to the same type
28 … *') and accumulator cva_accum() parameter 'accum' (type 'int *') must be pointers to the same type
29 … *') and accumulator cva_accum() parameter 'accum' (type 'int *') must be pointers to the same type
45 …e *') and accumulator AccumInt() parameter 'accum' (type 'int *') must be pointers to the same type
/frameworks/minikin/libs/minikin/
DFontFamily.cpp256 std::vector<std::shared_ptr<FontFamily>> pointers; in readVector() local
257 pointers.reserve(count); in readVector()
262 pointers.emplace_back(families, &families->back()); in readVector()
264 return pointers; in readVector()

12