| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "services/ui/ws/display.h" | 5 #include "services/ui/ws/display.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 display.set_bounds(metrics.bounds); | 98 display.set_bounds(metrics.bounds); |
| 99 display.set_work_area(metrics.work_area); | 99 display.set_work_area(metrics.work_area); |
| 100 display.set_device_scale_factor(metrics.device_scale_factor); | 100 display.set_device_scale_factor(metrics.device_scale_factor); |
| 101 display.set_rotation(metrics.rotation); | 101 display.set_rotation(metrics.rotation); |
| 102 display.set_touch_support( | 102 display.set_touch_support( |
| 103 display::Display::TouchSupport::TOUCH_SUPPORT_UNKNOWN); | 103 display::Display::TouchSupport::TOUCH_SUPPORT_UNKNOWN); |
| 104 | 104 |
| 105 return display; | 105 return display; |
| 106 } | 106 } |
| 107 | 107 |
| 108 void Display::SchedulePaint(const ServerWindow* window, | |
| 109 const gfx::Rect& bounds) { | |
| 110 DCHECK(root_->Contains(window)); | |
| 111 platform_display_->SchedulePaint(window, bounds); | |
| 112 } | |
| 113 | |
| 114 gfx::Size Display::GetSize() const { | 108 gfx::Size Display::GetSize() const { |
| 115 return platform_display_->GetBounds().size(); | 109 return platform_display_->GetBounds().size(); |
| 116 } | 110 } |
| 117 | 111 |
| 118 ServerWindow* Display::GetRootWithId(const WindowId& id) { | 112 ServerWindow* Display::GetRootWithId(const WindowId& id) { |
| 119 if (id == root_->id()) | 113 if (id == root_->id()) |
| 120 return root_.get(); | 114 return root_.get(); |
| 121 for (auto& pair : window_manager_display_root_map_) { | 115 for (auto& pair : window_manager_display_root_map_) { |
| 122 if (pair.second->root()->id() == id) | 116 if (pair.second->root()->id() == id) |
| 123 return pair.second->root(); | 117 return pair.second->root(); |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 } | 383 } |
| 390 | 384 |
| 391 void Display::OnWindowManagerWindowTreeFactoryReady( | 385 void Display::OnWindowManagerWindowTreeFactoryReady( |
| 392 WindowManagerWindowTreeFactory* factory) { | 386 WindowManagerWindowTreeFactory* factory) { |
| 393 if (!binding_) | 387 if (!binding_) |
| 394 CreateWindowManagerDisplayRootFromFactory(factory); | 388 CreateWindowManagerDisplayRootFromFactory(factory); |
| 395 } | 389 } |
| 396 | 390 |
| 397 } // namespace ws | 391 } // namespace ws |
| 398 } // namespace ui | 392 } // namespace ui |
| OLD | NEW |