#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/events/velocity_tracker/velocity_tracker_state.h"
#include "base/check_op.h"
#include "ui/events/velocity_tracker/motion_event.h"
namespace ui {
namespace {
const int ACTIVE_POINTER_ID = …;
}
VelocityTrackerState::VelocityTrackerState(VelocityTracker::Strategy strategy)
: … { … }
VelocityTrackerState::~VelocityTrackerState() { … }
void VelocityTrackerState::Clear() { … }
void VelocityTrackerState::AddMovement(const MotionEvent& event) { … }
void VelocityTrackerState::ComputeCurrentVelocity(int32_t units,
float max_velocity) { … }
float VelocityTrackerState::GetXVelocity(int32_t id) const { … }
float VelocityTrackerState::GetYVelocity(int32_t id) const { … }
void VelocityTrackerState::GetVelocity(int32_t id,
float* out_vx,
float* out_vy) const { … }
}