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

Unified Diff: ash/laser/laser_pointer_points.h

Issue 2716223002: ash: Use floating point precision for laser pointer. (Closed)
Patch Set: rebase and fix unit test Created 3 years, 10 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 | « ash/laser/laser_pointer_controller.cc ('k') | ash/laser/laser_pointer_points.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/laser/laser_pointer_points.h
diff --git a/ash/laser/laser_pointer_points.h b/ash/laser/laser_pointer_points.h
index a456595e1d9e77920be4cd2c9e4ad74860d0051d..3c40a1765c23a4cfa777227889a4de0c9f9ab089 100644
--- a/ash/laser/laser_pointer_points.h
+++ b/ash/laser/laser_pointer_points.h
@@ -11,7 +11,7 @@
#include "ash/ash_export.h"
#include "base/macros.h"
#include "base/time/time.h"
-#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/geometry/point_f.h"
#include "ui/gfx/geometry/rect.h"
namespace ash {
@@ -23,7 +23,7 @@ class ASH_EXPORT LaserPointerPoints {
public:
// Struct to describe each point.
struct LaserPoint {
- gfx::Point location;
+ gfx::PointF location;
// age is a value between [0,1] where 0 means the point was just added and 1
// means that the point is just about to be removed.
float age = 0.0f;
@@ -35,7 +35,7 @@ class ASH_EXPORT LaserPointerPoints {
~LaserPointerPoints();
// Adds a point. Automatically clears points that are too old.
- void AddPoint(const gfx::Point& point);
+ void AddPoint(const gfx::PointF& point);
// Updates the collection latest time. Automatically clears points that are
// too old.
void MoveForwardToTime(const base::Time& latest_time);
« no previous file with comments | « ash/laser/laser_pointer_controller.cc ('k') | ash/laser/laser_pointer_points.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698