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

Unified Diff: ash/display/display_change_observer_x11.cc

Issue 12505005: Store rotation/ui scale to local state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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/display_change_observer_x11.cc
diff --git a/ash/display/display_change_observer_x11.cc b/ash/display/display_change_observer_x11.cc
index 3f3f9bba6f127aa3fbe51a10d1fb66533aad3ee4..7bde515a7b8dddbd5f9dabe2c74aa9bc36e9f702 100644
--- a/ash/display/display_change_observer_x11.cc
+++ b/ash/display/display_change_observer_x11.cc
@@ -196,6 +196,9 @@ void DisplayChangeObserverX11::OnDisplayModeChanged() {
displays.push_back(DisplayInfo(id, name, has_overscan));
displays.back().set_device_scale_factor(device_scale_factor);
displays.back().SetBounds(display_bounds);
+ // Invalidate ui_scale (and rotation) so that DisplayInfo::CopyFromNative
+ // ignores ui_scale and rotate value.
+ displays.back().set_ui_scale(0.0f);
Jun Mukai 2013/03/22 00:53:07 setting a scale to '0' sounds awful to me. Why not
oshima 2013/03/22 02:06:51 because 1.0f is valid scale. I understand that thi
}
// Free all allocated resources.

Powered by Google App Engine
This is Rietveld 408576698