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

Unified Diff: services/ui/display/platform_screen_ozone.h

Issue 2356913002: Pass device scale factor from display to ws. (Closed)
Patch Set: Fix more tests. Created 4 years, 3 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
« no previous file with comments | « services/ui/display/platform_screen_delegate.h ('k') | services/ui/display/platform_screen_ozone.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/display/platform_screen_ozone.h
diff --git a/services/ui/display/platform_screen_ozone.h b/services/ui/display/platform_screen_ozone.h
index 88d2482227fd92521309e2492cf01cb583e317bc..5b712bc2d628db805314a0d76054c0283e95c4e1 100644
--- a/services/ui/display/platform_screen_ozone.h
+++ b/services/ui/display/platform_screen_ozone.h
@@ -47,12 +47,13 @@ class PlatformScreenOzone
// TODO(kylechar): This struct is just temporary until we migrate
// DisplayManager code out of ash so it can be used here.
struct DisplayInfo {
- DisplayInfo(int64_t new_id, const gfx::Rect& new_bounds)
- : id(new_id), bounds(new_bounds) {}
-
- int64_t id;
- // The display bounds.
+ int64_t id = Display::kInvalidDisplayID;
+ // The display bounds in DIP.
gfx::Rect bounds;
+ // Display size in DDP.
+ gfx::Size pixel_size;
+ // The display device pixel scale factor, either 1 or 2.
+ float device_scale_factor = 1.0f;
// The display bounds have been modified and delegate should be updated.
bool modified = false;
// The display has been removed and delegate should be updated.
@@ -90,6 +91,9 @@ class PlatformScreenOzone
// iterator if there is no display with that id.
CachedDisplayIterator GetCachedDisplayIterator(int64_t display_id);
+ // Converts |snapshot| into a DisplayInfo.
+ DisplayInfo DisplayInfoFromSnapshot(const ui::DisplaySnapshot& snapshot);
+
// ui::DisplayConfigurator::Observer:
void OnDisplayModeChanged(
const ui::DisplayConfigurator::DisplayStateList& displays) override;
« no previous file with comments | « services/ui/display/platform_screen_delegate.h ('k') | services/ui/display/platform_screen_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698