Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20746d73 authored by Steve Pfetsch's avatar Steve Pfetsch Committed by Automerger Merge Worker
Browse files

Merge "TouchVideoDevice: Silence log spam" into sc-dev am: ef32db74 am: a0563772

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/14811641

Change-Id: Ie91f1808843889ba11a3d11952a9078423c46cfb
parents f884640c a0563772
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -169,8 +169,9 @@ size_t TouchVideoDevice::readAndQueueFrames() {
    mFrames.insert(mFrames.end(), std::make_move_iterator(frames.begin()),
    mFrames.insert(mFrames.end(), std::make_move_iterator(frames.begin()),
                   std::make_move_iterator(frames.end()));
                   std::make_move_iterator(frames.end()));
    if (mFrames.size() > MAX_QUEUE_SIZE) {
    if (mFrames.size() > MAX_QUEUE_SIZE) {
        ALOGE("More than %zu frames have been accumulated. Dropping %zu frames", MAX_QUEUE_SIZE,
        // A user-space grip suppression process may be processing the video frames, and holding
              mFrames.size() - MAX_QUEUE_SIZE);
        // back the input events. This could result in video frames being produced without the
        // matching input events. Drop the oldest frame here to prepare for the next input event.
        mFrames.erase(mFrames.begin(), mFrames.end() - MAX_QUEUE_SIZE);
        mFrames.erase(mFrames.begin(), mFrames.end() - MAX_QUEUE_SIZE);
    }
    }
    return numFrames;
    return numFrames;