| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "ui/aura/window_tree_host.h" | 5 #include "ui/aura/window_tree_host.h" |
| 6 | 6 |
| 7 #include "base/threading/thread_task_runner_handle.h" | 7 #include "base/threading/thread_task_runner_handle.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "ui/aura/client/capture_client.h" | 9 #include "ui/aura/client/capture_client.h" |
| 10 #include "ui/aura/client/cursor_client.h" | 10 #include "ui/aura/client/cursor_client.h" |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 window()->set_host(this); | 261 window()->set_host(this); |
| 262 window()->SetName("RootWindow"); | 262 window()->SetName("RootWindow"); |
| 263 dispatcher_.reset(new WindowEventDispatcher(this)); | 263 dispatcher_.reset(new WindowEventDispatcher(this)); |
| 264 } | 264 } |
| 265 } | 265 } |
| 266 | 266 |
| 267 void WindowTreeHost::InitCompositor() { | 267 void WindowTreeHost::InitCompositor() { |
| 268 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()), | 268 compositor_->SetScaleAndSize(GetDeviceScaleFactorFromDisplay(window()), |
| 269 GetBoundsInPixels().size()); | 269 GetBoundsInPixels().size()); |
| 270 compositor_->SetRootLayer(window()->layer()); | 270 compositor_->SetRootLayer(window()->layer()); |
| 271 compositor_->SetDisplayColorSpace( | 271 compositor_->SetDisplayColorProfile(GetICCProfileForCurrentDisplay()); |
| 272 GetICCProfileForCurrentDisplay().GetColorSpace()); | |
| 273 } | 272 } |
| 274 | 273 |
| 275 void WindowTreeHost::OnAcceleratedWidgetAvailable() { | 274 void WindowTreeHost::OnAcceleratedWidgetAvailable() { |
| 276 compositor_->SetAcceleratedWidget(GetAcceleratedWidget()); | 275 compositor_->SetAcceleratedWidget(GetAcceleratedWidget()); |
| 277 prop_.reset(new ui::ViewProp(GetAcceleratedWidget(), | 276 prop_.reset(new ui::ViewProp(GetAcceleratedWidget(), |
| 278 kWindowTreeHostForAcceleratedWidget, this)); | 277 kWindowTreeHostForAcceleratedWidget, this)); |
| 279 } | 278 } |
| 280 | 279 |
| 281 void WindowTreeHost::OnHostMovedInPixels( | 280 void WindowTreeHost::OnHostMovedInPixels( |
| 282 const gfx::Point& new_location_in_pixels) { | 281 const gfx::Point& new_location_in_pixels) { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 344 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
| 346 if (cursor_client) { | 345 if (cursor_client) { |
| 347 const display::Display& display = | 346 const display::Display& display = |
| 348 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); | 347 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); |
| 349 cursor_client->SetDisplay(display); | 348 cursor_client->SetDisplay(display); |
| 350 } | 349 } |
| 351 dispatcher()->OnCursorMovedToRootLocation(root_location); | 350 dispatcher()->OnCursorMovedToRootLocation(root_location); |
| 352 } | 351 } |
| 353 | 352 |
| 354 } // namespace aura | 353 } // namespace aura |
| OLD | NEW |