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

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: Move sensors source to chrome/browser/chromeos and update 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
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 f5fd86c596c3dbc353920e41453e806f908bb268..4c0dac5c9f36fceb288b8bd0a15be827ede000af 100644
--- a/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
+++ b/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc
@@ -108,9 +108,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);
}
-

Powered by Google App Engine
This is Rietveld 408576698