| Index: ash/display/mirror_window_controller.cc
|
| diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc
|
| index b0e2d24f58708b56af2c74c3faee2a115031379d..0a21c61617f73d08d4a0251fa4f9ed4d9f49ae25 100644
|
| --- a/ash/display/mirror_window_controller.cc
|
| +++ b/ash/display/mirror_window_controller.cc
|
| @@ -56,8 +56,15 @@ class MirroringScreenPositionClient
|
|
|
| void ConvertPointToScreen(const aura::Window* window,
|
| gfx::Point* point) override {
|
| + gfx::PointF point_f(*point);
|
| + ConvertPointToScreenF(window, &point_f);
|
| + *point = gfx::ToFlooredPoint(point_f);
|
| + }
|
| +
|
| + void ConvertPointToScreenF(const aura::Window* window,
|
| + gfx::PointF* point) override {
|
| const aura::Window* root = window->GetRootWindow();
|
| - aura::Window::ConvertPointToTarget(window, root, point);
|
| + aura::Window::ConvertPointToTargetF(window, root, point);
|
| const display::Display& display =
|
| controller_->GetDisplayForRootWindow(root);
|
| const gfx::Point display_origin = display.bounds().origin();
|
| @@ -66,12 +73,19 @@ class MirroringScreenPositionClient
|
|
|
| void ConvertPointFromScreen(const aura::Window* window,
|
| gfx::Point* point) override {
|
| + gfx::PointF point_f(*point);
|
| + ConvertPointFromScreenF(window, &point_f);
|
| + *point = gfx::ToFlooredPoint(point_f);
|
| + }
|
| +
|
| + void ConvertPointFromScreenF(const aura::Window* window,
|
| + gfx::PointF* point) override {
|
| const aura::Window* root = window->GetRootWindow();
|
| const display::Display& display =
|
| controller_->GetDisplayForRootWindow(root);
|
| const gfx::Point display_origin = display.bounds().origin();
|
| point->Offset(-display_origin.x(), -display_origin.y());
|
| - aura::Window::ConvertPointToTarget(root, window, point);
|
| + aura::Window::ConvertPointToTargetF(root, window, point);
|
| }
|
|
|
| void ConvertHostPointToScreen(aura::Window* root_window,
|
|
|