chromium/cc/input/snap_fling_curve.cc

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

#include "cc/input/snap_fling_curve.h"

#include <algorithm>
#include <cmath>
#include "build/build_config.h"

namespace cc {
namespace {

#if BUILDFLAG(IS_ANDROID)
constexpr double kDistanceEstimatorScalar = 40;
// The delta to be scrolled in next frame is 0.9 of the delta in last frame.
constexpr double kRatio = 0.9;
#else
constexpr double kDistanceEstimatorScalar =;
// The delta to be scrolled in next frame is 0.92 of the delta in last frame.
constexpr double kRatio =;
#endif
constexpr auto kFrameTime =;
constexpr base::TimeDelta kMaximumSnapDuration =;

double GetDistanceFromDisplacement(gfx::Vector2dF displacement) {}

double EstimateFramesFromDistance(double distance) {}

double CalculateFirstDelta(double distance, double frames) {}

bool IsWithinOnePixel(gfx::Vector2dF actual, gfx::Vector2dF target) {}

}  // namespace

gfx::Vector2dF SnapFlingCurve::EstimateDisplacement(
    const gfx::Vector2dF& first_delta) {}

SnapFlingCurve::SnapFlingCurve(const gfx::PointF& start_offset,
                               const gfx::PointF& target_offset,
                               base::TimeTicks first_gsu_time)
    :{}

SnapFlingCurve::~SnapFlingCurve() = default;

double SnapFlingCurve::GetCurrentCurveDistance(base::TimeDelta current_time) {}

gfx::Vector2dF SnapFlingCurve::GetScrollDelta(base::TimeTicks time_stamp) {}

void SnapFlingCurve::UpdateCurrentOffset(const gfx::PointF& current_offset) {}

bool SnapFlingCurve::IsFinished() const {}

}  // namespace cc