Lines Matching refs:batch
61 // Add event into batch
154 Batch& batch = batches_.at(batchIndex);
155 if (CanAddSample(batch, inputEvent_)) {
156 batch.samples.push_back(inputEvent_);
157 MMI_HILOGD("Event added to batch, deviceId:%{public}d, sourceType:%{public}d, pointerAction:%{public}d",
163 // Start a new batch
165 Batch batch;
166 batch.samples.push_back(inputEvent_);
167 batches_.push_back(std::move(batch));
240 Batch& batch = batches_.at(i);
242 result = ConsumeSamples(batch, batch.samples.size(), outEvent);
251 ssize_t split = FindSampleNoLaterThan(batch, sampleTime);
256 result = ConsumeSamples(batch, split + 1, outEvent);
258 if (batch.samples.empty()) {
262 next = &batch.samples.at(0);
273 ErrCode EventResample::ConsumeSamples(Batch& batch, size_t count, MotionEvent** outEvent)
278 MotionEvent& event = batch.samples.at(i);
286 batch.samples.erase(batch.samples.begin(), batch.samples.begin() + count);
466 bool EventResample::CanAddSample(const Batch &batch, MotionEvent &event)
468 const MotionEvent& head = batch.samples.at(0);
494 ssize_t EventResample::FindSampleNoLaterThan(const Batch& batch, int64_t time)
496 size_t numSamples = batch.samples.size();
498 while ((idx < numSamples) && (batch.samples.at(idx).actionTime <= time)) {