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

Unified Diff: remoting/client/view_matrix.cc

Issue 2857113002: [Remoting Client] Fix scaling bug in ViewMatrix (Closed)
Patch Set: Resolve Feedback Created 3 years, 8 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 | « remoting/client/desktop_viewport_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/client/view_matrix.cc
diff --git a/remoting/client/view_matrix.cc b/remoting/client/view_matrix.cc
index 798548fcf4f2f27e82e87daeb7431327b1a5c59b..0172341747a32220da62e89d9ff72283292d0ad7 100644
--- a/remoting/client/view_matrix.cc
+++ b/remoting/client/view_matrix.cc
@@ -35,7 +35,9 @@ float ViewMatrix::GetScale() const {
void ViewMatrix::PostScale(const Point& pivot, float scale) {
scale_ *= scale;
+ offset_.x *= scale;
offset_.x += (1.f - scale) * pivot.x;
+ offset_.y *= scale;
offset_.y += (1.f - scale) * pivot.y;
}
« no previous file with comments | « remoting/client/desktop_viewport_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698