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

Commit 6d2425d4 authored by Steve Pfetsch's avatar Steve Pfetsch
Browse files

TouchVideoDevice: Silence log spam

When it was originally written, the TouchVideoDevice could expect that
every queued heatmap frame would correspond directly to a set of touch
coordinates. This is no longer true because touch coordinates may be
dropped before reaching InputFlinger. Therefore, heatmap frames may be
dropped frequently and the accompanying error message is less valuable.

Bug: 184000818
Bug: 189901803
Change-Id: I9ba848c70c0c5014e6ed5c2af8fd0f5629971254
(cherry picked from commit 343ab843)
parent c2baccc4
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;