| Index: remoting/client/ui/desktop_viewport.cc
|
| diff --git a/remoting/client/ui/desktop_viewport.cc b/remoting/client/ui/desktop_viewport.cc
|
| index 523afbde4150c3285f5cd1c7171d6c5f8f4cde18..c150f1bb6b02f4e58ab31bbc9bf372b1852ef27a 100644
|
| --- a/remoting/client/ui/desktop_viewport.cc
|
| +++ b/remoting/client/ui/desktop_viewport.cc
|
| @@ -69,6 +69,16 @@ ViewMatrix::Point DesktopViewport::GetViewportCenter() const {
|
| {surface_size_.x / 2.f, surface_size_.y / 2.f});
|
| }
|
|
|
| +bool DesktopViewport::IsPointWithinDesktopBounds(
|
| + const ViewMatrix::Point& point) const {
|
| + if (!IsViewportReady()) {
|
| + LOG(WARNING) << "Viewport is not ready";
|
| + return false;
|
| + }
|
| + return point.x >= 0 && point.y >= 0 && point.x < desktop_size_.x &&
|
| + point.y < desktop_size_.y;
|
| +}
|
| +
|
| ViewMatrix::Point DesktopViewport::ConstrainPointToDesktop(
|
| const ViewMatrix::Point& point) const {
|
| if (!IsViewportReady()) {
|
|
|