| Index: ui/aura/window_tree_host.cc
|
| diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
|
| index 5bf1eb1d8ca4414f261ea1a7d99b0e0b2028a4ce..f8a651927fdcf644588eda8c4c5a65e758d4c991 100644
|
| --- a/ui/aura/window_tree_host.cc
|
| +++ b/ui/aura/window_tree_host.cc
|
| @@ -37,10 +37,6 @@ namespace aura {
|
| const char kWindowTreeHostForAcceleratedWidget[] =
|
| "__AURA_WINDOW_TREE_HOST_ACCELERATED_WIDGET__";
|
|
|
| -float GetDeviceScaleFactorFromDisplay(Window* window) {
|
| - return ui::GetScaleFactorForNativeView(window);
|
| -}
|
| -
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // WindowTreeHost, public:
|
|
|
| @@ -278,10 +274,12 @@ void WindowTreeHost::CreateCompositor(const cc::FrameSinkId& frame_sink_id) {
|
| }
|
|
|
| void WindowTreeHost::InitCompositor() {
|
| - compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
|
| + display::Display display =
|
| + display::Screen::GetScreen()->GetDisplayNearestWindow(window());
|
| + compositor_->SetScaleAndSize(display.device_scale_factor(),
|
| GetBoundsInPixels().size());
|
| compositor_->SetRootLayer(window()->layer());
|
| - compositor_->SetDisplayColorProfile(GetICCProfileForCurrentDisplay());
|
| + compositor_->SetDisplayColorSpace(display.color_space());
|
| }
|
|
|
| void WindowTreeHost::OnAcceleratedWidgetAvailable() {
|
| @@ -306,7 +304,7 @@ void WindowTreeHost::OnHostResizedInPixels(
|
| output_surface_padding_in_pixels_.height());
|
| // The compositor should have the same size as the native root window host.
|
| // Get the latest scale from display because it might have been changed.
|
| - compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()),
|
| + compositor_->SetScaleAndSize(ui::GetScaleFactorForNativeView(window()),
|
| adjusted_size);
|
|
|
| gfx::Size layer_size = GetBoundsInPixels().size();
|
| @@ -337,12 +335,6 @@ void WindowTreeHost::OnHostLostWindowCapture() {
|
| capture_window->ReleaseCapture();
|
| }
|
|
|
| -gfx::ICCProfile WindowTreeHost::GetICCProfileForCurrentDisplay() {
|
| - // TODO(hubbe): Get the color space from the *current* monitor and
|
| - // update it when window is moved or color space configuration changes.
|
| - return gfx::ICCProfile::FromBestMonitor();
|
| -}
|
| -
|
| ui::EventSink* WindowTreeHost::GetEventSink() {
|
| return dispatcher_.get();
|
| }
|
|
|