chromium/ui/events/velocity_tracker/motion_event_buffer.h

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_EVENTS_VELOCITY_TRACKER_MOTION_EVENT_BUFFER_H_
#define UI_EVENTS_VELOCITY_TRACKER_MOTION_EVENT_BUFFER_H_

#include <memory>
#include <vector>

#include "base/component_export.h"
#include "base/memory/raw_ptr.h"
#include "base/time/time.h"

namespace ui {

class MotionEvent;
class MotionEventGeneric;

// Allows event forwarding and flush requests from a |MotionEventBuffer|.
class MotionEventBufferClient {};

// Utility class for buffering streamed MotionEventVector until a given flush.
// Events that can be combined will remain buffered, and depending on the flush
// time and buffered events, a resampled event with history will be synthesized.
// The primary purpose of this class is to ensure a smooth output motion signal
// by resampling a discrete input signal that may run on a different frequency
// or lack alignment with the output display signal.
// Note that this class is largely based on code from Android's existing touch
// pipeline (in particular, logic from ImageTransport, http://goo.gl/Ixsb0D).
// See the design doc at http://goo.gl/MdmpCf for more details.
class COMPONENT_EXPORT(VELOCITY_TRACKER) MotionEventBuffer {};

}  // namespace ui

#endif  // UI_EVENTS_VELOCITY_TRACKER_MOTION_EVENT_BUFFER_H_