Remove uses of VectorFromPPPoint() and PPPointFromVector().

This CL removes uses of VectorFromPPPoint() since it no longer has a
caller, and replaces PPPointFromVector() with a pp::Point constructor.

Change-Id: I773be154d1eb844325832ff1248147a890c36f73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2604953
Commit-Queue: Hui Yingst <nigi@chromium.org>
Reviewed-by: K. Moon <kmoon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#840752}
diff --git a/pdf/ppapi_migration/geometry_conversions.cc b/pdf/ppapi_migration/geometry_conversions.cc
index de989c5..744e12d8 100644
--- a/pdf/ppapi_migration/geometry_conversions.cc
+++ b/pdf/ppapi_migration/geometry_conversions.cc
@@ -55,12 +55,4 @@
   return PP_MakeSize(size.width(), size.height());
 }
 
-gfx::Vector2d VectorFromPPPoint(const PP_Point& pp_point) {
-  return gfx::Vector2d(pp_point.x, pp_point.y);
-}
-
-PP_Point PPPointFromVector(const gfx::Vector2d& vector) {
-  return PP_MakePoint(vector.x(), vector.y());
-}
-
 }  // namespace chrome_pdf
diff --git a/pdf/ppapi_migration/geometry_conversions.h b/pdf/ppapi_migration/geometry_conversions.h
index a495d59..576dc52 100644
--- a/pdf/ppapi_migration/geometry_conversions.h
+++ b/pdf/ppapi_migration/geometry_conversions.h
@@ -17,7 +17,6 @@
 class Rect;
 class RectF;
 class Size;
-class Vector2d;
 }  // namespace gfx
 
 namespace chrome_pdf {
@@ -36,9 +35,6 @@
 gfx::Size SizeFromPPSize(const PP_Size& pp_size);
 PP_Size PPSizeFromSize(const gfx::Size& size);
 
-gfx::Vector2d VectorFromPPPoint(const PP_Point& pp_point);
-PP_Point PPPointFromVector(const gfx::Vector2d& vector);
-
 }  // namespace chrome_pdf
 
 #endif  // PDF_PPAPI_MIGRATION_GEOMETRY_CONVERSIONS_H_
diff --git a/pdf/ppapi_migration/geometry_conversions_unittest.cc b/pdf/ppapi_migration/geometry_conversions_unittest.cc
index 598e813..19ff4ee 100644
--- a/pdf/ppapi_migration/geometry_conversions_unittest.cc
+++ b/pdf/ppapi_migration/geometry_conversions_unittest.cc
@@ -112,22 +112,4 @@
   EXPECT_EQ(pp_c_size.height, 3);
 }
 
-TEST(GeometryConversionsTest, VectorFromPPPoint) {
-  gfx::Vector2d point = VectorFromPPPoint(pp::Point(-1, 2));
-  EXPECT_EQ(point, gfx::Vector2d(-1, 2));
-
-  point = VectorFromPPPoint(PP_MakePoint(2, -1));
-  EXPECT_EQ(point, gfx::Vector2d(2, -1));
-}
-
-TEST(GeometryConversionsTest, PPPointFromVector) {
-  pp::Point pp_cpp_point = PPPointFromVector(gfx::Vector2d(-1, 2));
-  EXPECT_EQ(pp_cpp_point.x(), -1);
-  EXPECT_EQ(pp_cpp_point.y(), 2);
-
-  PP_Point pp_c_point = PPPointFromVector(gfx::Vector2d(2, -1));
-  EXPECT_EQ(pp_c_point.x, 2);
-  EXPECT_EQ(pp_c_point.y, -1);
-}
-
 }  // namespace chrome_pdf
diff --git a/pdf/ppapi_migration/graphics.cc b/pdf/ppapi_migration/graphics.cc
index 7595f74..73b19a8 100644
--- a/pdf/ppapi_migration/graphics.cc
+++ b/pdf/ppapi_migration/graphics.cc
@@ -62,7 +62,8 @@
 
 void PepperGraphics::Scroll(const gfx::Rect& clip,
                             const gfx::Vector2d& amount) {
-  pepper_graphics_.Scroll(PPRectFromRect(clip), PPPointFromVector(amount));
+  pepper_graphics_.Scroll(PPRectFromRect(clip),
+                          pp::Point(amount.x(), amount.y()));
 }
 
 void PepperGraphics::SetScale(float scale) {
@@ -74,7 +75,7 @@
                                        const gfx::Point& origin,
                                        const gfx::Vector2d& translate) {
   bool result = pepper_graphics_.SetLayerTransform(
-      scale, PPPointFromPoint(origin), PPPointFromVector(translate));
+      scale, PPPointFromPoint(origin), pp::Point(translate.x(), translate.y()));
   DCHECK(result);
 }