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

Side by Side Diff: services/ui/ws/display.cc

Issue 2474113002: Mus+Ash: Unified BeginFrame Skeleton (Closed)
Patch Set: Rebase Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « services/ui/ws/display.h ('k') | services/ui/ws/display_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « services/ui/ws/display.h ('k') | services/ui/ws/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698