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

Unified Diff: ui/events/mojo/latency_info_struct_traits.h

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/mojo/latency_info.typemap ('k') | ui/events/mojo/latency_info_struct_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/mojo/latency_info_struct_traits.h
diff --git a/ui/events/mojo/latency_info_struct_traits.h b/ui/events/mojo/latency_info_struct_traits.h
index 9bd9d7d8afa5105e88bcf2ae8c3e2d9f3e05fc37..14ba52a2e0517c281e3bf730a0a599535e775617 100644
--- a/ui/events/mojo/latency_info_struct_traits.h
+++ b/ui/events/mojo/latency_info_struct_traits.h
@@ -7,37 +7,21 @@
#include "ui/events/latency_info.h"
#include "ui/events/mojo/latency_info.mojom.h"
+#include "ui/gfx/geometry/mojo/geometry_struct_traits.h"
namespace mojo {
-template <>
-struct StructTraits<ui::mojom::InputCoordinate,
- ui::LatencyInfo::InputCoordinate> {
- static float x(const ui::LatencyInfo::InputCoordinate& input) {
- return input.x;
- }
- static float y(const ui::LatencyInfo::InputCoordinate& input) {
- return input.y;
- }
- static bool Read(ui::mojom::InputCoordinateDataView data,
- ui::LatencyInfo::InputCoordinate* out) {
- out->x = data.x();
- out->y = data.y();
- return true;
- }
-};
-
// A buffer used to read bytes directly from LatencyInfoDataView into
// ui::LatencyInfo's input_coordinates_.
struct InputCoordinateArray {
size_t size;
- ui::LatencyInfo::InputCoordinate* data;
+ gfx::PointF* data;
};
// TODO(fsamuel): We should add a common ArrayTraits<CArray<T>> utility struct.
template <>
struct ArrayTraits<InputCoordinateArray> {
- using Element = ui::LatencyInfo::InputCoordinate;
+ using Element = gfx::PointF;
static size_t GetSize(const InputCoordinateArray& b);
static Element* GetData(InputCoordinateArray& b);
static const Element* GetData(const InputCoordinateArray& b);
« no previous file with comments | « ui/events/mojo/latency_info.typemap ('k') | ui/events/mojo/latency_info_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698