OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/display/manager/display_manager.h" | 5 #include "ui/display/manager/display_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <limits> | 9 #include <limits> |
10 #include <map> | 10 #include <map> |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 const DisplayLayout& layout = | 689 const DisplayLayout& layout = |
690 layout_store_->GetRegisteredDisplayLayout(list); | 690 layout_store_->GetRegisteredDisplayLayout(list); |
691 current_default_multi_display_mode_ = | 691 current_default_multi_display_mode_ = |
692 (layout.default_unified && unified_desktop_enabled_) ? UNIFIED | 692 (layout.default_unified && unified_desktop_enabled_) ? UNIFIED |
693 : EXTENDED; | 693 : EXTENDED; |
694 } | 694 } |
695 | 695 |
696 if (multi_display_mode_ != MIRRORING) | 696 if (multi_display_mode_ != MIRRORING) |
697 multi_display_mode_ = current_default_multi_display_mode_; | 697 multi_display_mode_ = current_default_multi_display_mode_; |
698 | 698 |
699 CreateSoftwareMirroringDisplayInfo(&new_display_info_list); | |
700 | |
701 // Close the mirroring window if any here to avoid creating two compositor on | 699 // Close the mirroring window if any here to avoid creating two compositor on |
702 // one display. | 700 // one display. |
703 if (delegate_) | 701 if (delegate_) |
704 delegate_->CloseMirroringDisplayIfNotNecessary(); | 702 delegate_->CloseMirroringDisplayIfNotNecessary(); |
705 | 703 |
| 704 CreateSoftwareMirroringDisplayInfo(&new_display_info_list); |
| 705 |
706 Displays new_displays; | 706 Displays new_displays; |
707 Displays removed_displays; | 707 Displays removed_displays; |
708 std::map<size_t, uint32_t> display_changes; | 708 std::map<size_t, uint32_t> display_changes; |
709 std::vector<size_t> added_display_indices; | 709 std::vector<size_t> added_display_indices; |
710 | 710 |
711 Displays::iterator curr_iter = active_display_list_.begin(); | 711 Displays::iterator curr_iter = active_display_list_.begin(); |
712 DisplayInfoList::const_iterator new_info_iter = new_display_info_list.begin(); | 712 DisplayInfoList::const_iterator new_info_iter = new_display_info_list.begin(); |
713 | 713 |
714 while (curr_iter != active_display_list_.end() || | 714 while (curr_iter != active_display_list_.end() || |
715 new_info_iter != new_display_info_list.end()) { | 715 new_info_iter != new_display_info_list.end()) { |
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1499 } | 1499 } |
1500 | 1500 |
1501 const Display& DisplayManager::GetSecondaryDisplay() const { | 1501 const Display& DisplayManager::GetSecondaryDisplay() const { |
1502 CHECK_LE(2U, GetNumDisplays()); | 1502 CHECK_LE(2U, GetNumDisplays()); |
1503 return GetDisplayAt(0).id() == Screen::GetScreen()->GetPrimaryDisplay().id() | 1503 return GetDisplayAt(0).id() == Screen::GetScreen()->GetPrimaryDisplay().id() |
1504 ? GetDisplayAt(1) | 1504 ? GetDisplayAt(1) |
1505 : GetDisplayAt(0); | 1505 : GetDisplayAt(0); |
1506 } | 1506 } |
1507 | 1507 |
1508 } // namespace display | 1508 } // namespace display |
OLD | NEW |