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: ash/display/root_window_transformers.cc

Issue 1071353003: Prevent DisplayPreferences from saving incorrect rotations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 | « ash/display/display_manager.cc ('k') | ash/display/root_window_transformers_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/root_window_transformers.cc
diff --git a/ash/display/root_window_transformers.cc b/ash/display/root_window_transformers.cc
index 509bb8e215e64f1098c4d7a92e74e1552f978bc0..8a028b37a1061f9ac21f2dbc7396288cce216d88 100644
--- a/ash/display/root_window_transformers.cc
+++ b/ash/display/root_window_transformers.cc
@@ -62,16 +62,18 @@ gfx::Transform CreateRotationTransform(aura::Window* root_window,
// updating the transform results in incorrectly resizing
// the root window. Don't apply the transform unless
// necessary so that unit tests pass on win8 bots.
- if (info.rotation() == root_window->GetProperty(kRotationPropertyKey))
+ if (info.GetActiveRotation() ==
+ root_window->GetProperty(kRotationPropertyKey)) {
return gfx::Transform();
- root_window->SetProperty(kRotationPropertyKey, info.rotation());
+ }
+ root_window->SetProperty(kRotationPropertyKey, info.GetActiveRotation());
#endif
gfx::Transform rotate;
// The origin is (0, 0), so the translate width/height must be reduced by
// 1 pixel.
float one_pixel = 1.0f / display.device_scale_factor();
- switch (info.rotation()) {
+ switch (info.GetActiveRotation()) {
case gfx::Display::ROTATE_0:
break;
case gfx::Display::ROTATE_90:
« no previous file with comments | « ash/display/display_manager.cc ('k') | ash/display/root_window_transformers_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698