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 19 matching lines...) Expand all Loading... | |
30 #include "ui/gfx/icc_profile.h" | 30 #include "ui/gfx/icc_profile.h" |
31 | 31 |
32 namespace aura { | 32 namespace aura { |
33 | 33 |
34 const char kWindowTreeHostForAcceleratedWidget[] = | 34 const char kWindowTreeHostForAcceleratedWidget[] = |
35 "__AURA_WINDOW_TREE_HOST_ACCELERATED_WIDGET__"; | 35 "__AURA_WINDOW_TREE_HOST_ACCELERATED_WIDGET__"; |
36 | 36 |
37 float GetDeviceScaleFactorFromDisplay(Window* window) { | 37 float GetDeviceScaleFactorFromDisplay(Window* window) { |
38 display::Display display = | 38 display::Display display = |
39 display::Screen::GetScreen()->GetDisplayNearestWindow(window); | 39 display::Screen::GetScreen()->GetDisplayNearestWindow(window); |
40 DCHECK(display.is_valid()); | 40 // TODO: MusDemo fails in external mode because no display is available. |
tonikitoo
2017/02/14 17:19:22
fixing this should be our goal now, so that we unb
fwang
2017/02/15 13:59:52
Acknowledged.
| |
41 // DCHECK(display.is_valid()); | |
41 return display.device_scale_factor(); | 42 return display.device_scale_factor(); |
42 } | 43 } |
43 | 44 |
44 //////////////////////////////////////////////////////////////////////////////// | 45 //////////////////////////////////////////////////////////////////////////////// |
45 // WindowTreeHost, public: | 46 // WindowTreeHost, public: |
46 | 47 |
47 WindowTreeHost::~WindowTreeHost() { | 48 WindowTreeHost::~WindowTreeHost() { |
48 DCHECK(!compositor_) << "compositor must be destroyed before root window"; | 49 DCHECK(!compositor_) << "compositor must be destroyed before root window"; |
49 if (owned_input_method_) { | 50 if (owned_input_method_) { |
50 delete input_method_; | 51 delete input_method_; |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
347 client::CursorClient* cursor_client = client::GetCursorClient(window()); | 348 client::CursorClient* cursor_client = client::GetCursorClient(window()); |
348 if (cursor_client) { | 349 if (cursor_client) { |
349 const display::Display& display = | 350 const display::Display& display = |
350 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); | 351 display::Screen::GetScreen()->GetDisplayNearestWindow(window()); |
351 cursor_client->SetDisplay(display); | 352 cursor_client->SetDisplay(display); |
352 } | 353 } |
353 dispatcher()->OnCursorMovedToRootLocation(root_location); | 354 dispatcher()->OnCursorMovedToRootLocation(root_location); |
354 } | 355 } |
355 | 356 |
356 } // namespace aura | 357 } // namespace aura |
OLD | NEW |