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

Unified Diff: chrome/browser/ui/touch/frame/touch_browser_frame_view.cc

Issue 7862020: chromeos: Add operations to monitor the screen orientation. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebased with fixed line endings in DEPS Created 9 years, 3 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 | « chrome/browser/chromeos/sensors_source_chromeos.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
diff --git a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
index c81d51bdad778ca026508da13388fc21545ae5bc..6dda0f74048d4359180ee5c8bfd693c24df4302b 100644
--- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
+++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
@@ -109,10 +109,10 @@ void TouchBrowserFrameView::OnScreenOrientationChanged(
initialized_screen_rotation_ = true;
}
- ui::Transform xform = SideToTransform(change.upward,
- to_rotate->GetTransform(),
- to_rotate->size());
-
- to_rotate->SetTransform(xform);
+ const ui::Transform& old_xform = to_rotate->GetTransform();
+ const ui::Transform& new_xform = SideToTransform(change.upward,
+ old_xform,
+ to_rotate->size());
+ if (old_xform != new_xform)
+ to_rotate->SetTransform(new_xform);
}
-
« no previous file with comments | « chrome/browser/chromeos/sensors_source_chromeos.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698