Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1931)

Unified Diff: ui/events/latency_info.cc

Issue 2039853004: Replace ui::LatencyInfo::InputCoordinate with gfx::PointF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added missing gyp dep Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/latency_info.h ('k') | ui/events/mojo/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/latency_info.cc
diff --git a/ui/events/latency_info.cc b/ui/events/latency_info.cc
index 799279a6eba07871ebded6e8d7cef699f0e6f64b..a2bc9782170af79c039b86f5fb4c142bf30a807e 100644
--- a/ui/events/latency_info.cc
+++ b/ui/events/latency_info.cc
@@ -137,12 +137,6 @@ static base::LazyInstance<LatencyInfoEnabledInitializer>::Leaky
namespace ui {
-LatencyInfo::InputCoordinate::InputCoordinate() : x(0), y(0) {
-}
-
-LatencyInfo::InputCoordinate::InputCoordinate(float x, float y) : x(x), y(y) {
-}
-
LatencyInfo::LatencyInfo()
: input_coordinates_size_(0),
trace_id_(-1),
@@ -343,8 +337,8 @@ LatencyInfo::CoordinatesAsTraceableData() {
for (size_t i = 0; i < input_coordinates_size_; i++) {
std::unique_ptr<base::DictionaryValue> coordinate_pair(
new base::DictionaryValue());
- coordinate_pair->SetDouble("x", input_coordinates_[i].x);
- coordinate_pair->SetDouble("y", input_coordinates_[i].y);
+ coordinate_pair->SetDouble("x", input_coordinates_[i].x());
+ coordinate_pair->SetDouble("y", input_coordinates_[i].y());
coordinates->Append(coordinate_pair.release());
}
return LatencyInfoTracedValue::FromValue(std::move(coordinates));
@@ -375,7 +369,7 @@ void LatencyInfo::RemoveLatency(LatencyComponentType type) {
}
}
-bool LatencyInfo::AddInputCoordinate(const InputCoordinate& input_coordinate) {
+bool LatencyInfo::AddInputCoordinate(const gfx::PointF& input_coordinate) {
if (input_coordinates_size_ >= kMaxInputCoordinates)
return false;
input_coordinates_[input_coordinates_size_++] = input_coordinate;
« no previous file with comments | « ui/events/latency_info.h ('k') | ui/events/mojo/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698