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

Side by Side Diff: ui/display/screen_base.cc

Issue 2547243002: Set device scale factor in CompositorFrame and scale frame size in WS. (Closed)
Patch Set: comments Created 4 years 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/platform_display_default.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // This has to be before any other includes, else default is picked up. 5 // This has to be before any other includes, else default is picked up.
6 // See base/logging for details on this. 6 // See base/logging for details on this.
7 #define NOTIMPLEMENTED_POLICY 5 7 #define NOTIMPLEMENTED_POLICY 5
8 8
9 #include "ui/display/screen_base.h" 9 #include "ui/display/screen_base.h"
10 10
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 33
34 Display ScreenBase::GetPrimaryDisplay() const { 34 Display ScreenBase::GetPrimaryDisplay() const {
35 auto iter = display_list_.GetPrimaryDisplayIterator(); 35 auto iter = display_list_.GetPrimaryDisplayIterator();
36 if (iter == display_list_.displays().end()) 36 if (iter == display_list_.displays().end())
37 return Display(); // Invalid display since we have no primary display. 37 return Display(); // Invalid display since we have no primary display.
38 return *iter; 38 return *iter;
39 } 39 }
40 40
41 Display ScreenBase::GetDisplayNearestWindow(gfx::NativeView view) const { 41 Display ScreenBase::GetDisplayNearestWindow(gfx::NativeView view) const {
42 // TODO(riajiang): Implement this for multi-displays either here or in
sky 2016/12/16 18:11:49 ScreenMus may end up using ScreenAsh. But we'll st
43 // ScreenMus.
42 NOTIMPLEMENTED(); 44 NOTIMPLEMENTED();
43 return GetPrimaryDisplay(); 45 return GetPrimaryDisplay();
44 } 46 }
45 47
46 Display ScreenBase::GetDisplayNearestPoint(const gfx::Point& point) const { 48 Display ScreenBase::GetDisplayNearestPoint(const gfx::Point& point) const {
47 return *FindDisplayNearestPoint(display_list_.displays(), point); 49 return *FindDisplayNearestPoint(display_list_.displays(), point);
48 } 50 }
49 51
50 int ScreenBase::GetNumDisplays() const { 52 int ScreenBase::GetNumDisplays() const {
51 return static_cast<int>(display_list_.displays().size()); 53 return static_cast<int>(display_list_.displays().size());
(...skipping 25 matching lines...) Expand all
77 is_primary ? DisplayList::Type::PRIMARY 79 is_primary ? DisplayList::Type::PRIMARY
78 : DisplayList::Type::NOT_PRIMARY); 80 : DisplayList::Type::NOT_PRIMARY);
79 return; 81 return;
80 } 82 }
81 display_list_.UpdateDisplay( 83 display_list_.UpdateDisplay(
82 changed_display, 84 changed_display,
83 is_primary ? DisplayList::Type::PRIMARY : DisplayList::Type::NOT_PRIMARY); 85 is_primary ? DisplayList::Type::PRIMARY : DisplayList::Type::NOT_PRIMARY);
84 } 86 }
85 87
86 } // namespace display 88 } // namespace display
OLDNEW
« no previous file with comments | « services/ui/ws/platform_display_default.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698