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

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: 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
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..e178d3aa5634370daf44195d8ecddddb28fd0dc5 100644
--- a/ash/display/root_window_transformers.cc
+++ b/ash/display/root_window_transformers.cc
@@ -62,16 +62,16 @@ 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.Rotation() == root_window->GetProperty(kRotationPropertyKey))
return gfx::Transform();
- root_window->SetProperty(kRotationPropertyKey, info.rotation());
+ root_window->SetProperty(kRotationPropertyKey, info.Rotation());
#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.Rotation(gfx::Display::ROTATION_SOURCE_ACTIVE)) {
case gfx::Display::ROTATE_0:
break;
case gfx::Display::ROTATE_90:

Powered by Google App Engine
This is Rietveld 408576698