Lines Matching refs:fps
36 explicit constexpr Fps(float fps) in Fps() argument
37 : fps(fps), period(fps == 0.0f ? 0 : static_cast<nsecs_t>(1e9f / fps)) {} in Fps()
39 constexpr float getValue() const { return fps; } in getValue()
43 bool equalsWithMargin(const Fps& other) const { return std::abs(fps - other.fps) < kMargin; } in equalsWithMargin()
46 bool lessThanWithMargin(const Fps& other) const { return fps + kMargin < other.fps; } in lessThanWithMargin()
48 bool greaterThanWithMargin(const Fps& other) const { return fps > other.fps + kMargin; } in greaterThanWithMargin()
54 bool isValid() const { return fps > 0.0f; } in isValid()
56 int getIntValue() const { return static_cast<int>(std::round(fps)); } in getIntValue()
61 return left.fps < right.fps; in comparesLess()
81 inline friend std::string to_string(const Fps& fps) { in to_string() argument
82 return base::StringPrintf("%.2ffps", fps.fps); in to_string()
85 inline friend std::ostream& operator<<(std::ostream& os, const Fps& fps) {
86 return os << to_string(fps);
92 constexpr Fps(float fps, nsecs_t period) : fps(fps), period(period) {} in Fps() argument
94 float getBucket() const { return std::round(fps / kMargin); } in getBucket()
97 float fps = 0; variable
108 std::size_t operator()(const android::Fps& fps) const {
109 return std::hash<float>()(fps.getBucket());