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

Unified Diff: services/ui/ws/platform_display_default.cc

Issue 2763143002: Remove FrameGenerator::root_window_ (Closed)
Patch Set: PlatformDisplayDefault does not implement ServerWindowObserver Created 3 years, 9 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
Index: services/ui/ws/platform_display_default.cc
diff --git a/services/ui/ws/platform_display_default.cc b/services/ui/ws/platform_display_default.cc
index a126d699c0df820a8eb3ad71a2dd2ebf75ed8794..ea7c9a26c5107cbedbfa111330ca16cb9bba5276 100644
--- a/services/ui/ws/platform_display_default.cc
+++ b/services/ui/ws/platform_display_default.cc
@@ -37,8 +37,7 @@ PlatformDisplayDefault::PlatformDisplayDefault(
image_cursors_(new ImageCursors),
#endif
metrics_(metrics),
- widget_(gfx::kNullAcceleratedWidget),
- init_device_scale_factor_(metrics.device_scale_factor) {
+ widget_(gfx::kNullAcceleratedWidget) {
}
PlatformDisplayDefault::~PlatformDisplayDefault() {
@@ -134,6 +133,8 @@ bool PlatformDisplayDefault::UpdateViewportMetrics(
if (bounds.size() != metrics.bounds_in_pixels.size()) {
bounds.set_size(metrics.bounds_in_pixels.size());
platform_window_->SetBounds(bounds);
+ if (frame_generator_)
+ frame_generator_->OnWindowBoundsChanged(bounds);
}
metrics_ = metrics;
@@ -257,8 +258,9 @@ void PlatformDisplayDefault::OnAcceleratedWidgetAvailable(
std::move(display_private),
std::move(compositor_frame_sink_client_request));
frame_generator_ = base::MakeUnique<FrameGenerator>(
- root_window_, std::move(display_client_compositor_frame_sink));
- frame_generator_->SetDeviceScaleFactor(init_device_scale_factor_);
+ std::move(display_client_compositor_frame_sink));
+ frame_generator_->OnWindowBoundsChanged(root_window_->bounds());
+ frame_generator_->SetDeviceScaleFactor(metrics_.device_scale_factor);
}
void PlatformDisplayDefault::OnAcceleratedWidgetDestroyed() {
« services/ui/ws/frame_generator.h ('K') | « services/ui/ws/platform_display_default.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698