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

Unified Diff: ash/laser/laser_pointer_view.cc

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_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/laser/laser_pointer_view.cc
diff --git a/ash/laser/laser_pointer_view.cc b/ash/laser/laser_pointer_view.cc
index 78e171822b51870318d39453a3e037aa3e29b9e2..2dc92340dc75d979818447dff9ef17b8f5703723 100644
--- a/ash/laser/laser_pointer_view.cc
+++ b/ash/laser/laser_pointer_view.cc
@@ -46,8 +46,8 @@ const int kPointInitialOpacity = 200;
const int kPointFinalOpacity = 10;
const SkColor kPointColor = SkColorSetRGB(255, 0, 0);
-float DistanceBetweenPoints(const gfx::Point& point1,
- const gfx::Point& point2) {
+float DistanceBetweenPoints(const gfx::PointF& point1,
+ const gfx::PointF& point2) {
return (point1 - point2).Length();
}
@@ -245,7 +245,7 @@ void LaserPointerView::Stop() {
OnPointsUpdated();
}
-void LaserPointerView::AddNewPoint(const gfx::Point& new_point) {
+void LaserPointerView::AddNewPoint(const gfx::PointF& new_point) {
buffer_damage_rect_.Union(GetBoundingBox());
laser_points_.AddPoint(new_point);
buffer_damage_rect_.Union(GetBoundingBox());
« no previous file with comments | « ash/laser/laser_pointer_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698