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

Unified Diff: components/mus/ws/platform_display.cc

Issue 1899923002: Basic display management for mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix chromecast build Created 4 years, 7 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 | « components/mus/ws/BUILD.gn ('k') | components/mus/ws/platform_display_init_params.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/platform_display.cc
diff --git a/components/mus/ws/platform_display.cc b/components/mus/ws/platform_display.cc
index 2da8018fba8e4fe8e3c7df3d47b9cc1262dc3f95..410ac196638344ef1a9aa844f9ee28b2fb168162 100644
--- a/components/mus/ws/platform_display.cc
+++ b/components/mus/ws/platform_display.cc
@@ -177,8 +177,9 @@ DefaultPlatformDisplay::DefaultPlatformDisplay(
#endif
weak_factory_(this) {
metrics_.size_in_pixels = mojo::Size::New();
- metrics_.size_in_pixels->width = 1024;
- metrics_.size_in_pixels->height = 768;
+ metrics_.size_in_pixels->width = init_params.display_bounds.width();
+ metrics_.size_in_pixels->height = init_params.display_bounds.height();
+ // TODO(rjkroege): Preserve the display_id when Ozone platform can use it.
}
void DefaultPlatformDisplay::Init(PlatformDisplayDelegate* delegate) {
@@ -309,6 +310,7 @@ void DefaultPlatformDisplay::WantToDraw() {
if (draw_timer_.IsRunning() || frame_pending_)
return;
+ // TODO(rjkroege): Use vblank to kick off Draw.
draw_timer_.Start(
FROM_HERE, base::TimeDelta(),
base::Bind(&DefaultPlatformDisplay::Draw, weak_factory_.GetWeakPtr()));
« no previous file with comments | « components/mus/ws/BUILD.gn ('k') | components/mus/ws/platform_display_init_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698