| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/mus/ws/platform_display.h" | 5 #include "components/mus/ws/platform_display.h" |
| 6 | 6 |
| 7 #include "base/numerics/safe_conversions.h" | 7 #include "base/numerics/safe_conversions.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
| 10 #include "cc/output/copy_output_request.h" | 10 #include "cc/output/copy_output_request.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "components/mus/ws/window_coordinate_conversions.h" | 26 #include "components/mus/ws/window_coordinate_conversions.h" |
| 27 #include "services/shell/public/cpp/connection.h" | 27 #include "services/shell/public/cpp/connection.h" |
| 28 #include "services/shell/public/cpp/connector.h" | 28 #include "services/shell/public/cpp/connector.h" |
| 29 #include "third_party/skia/include/core/SkXfermode.h" | 29 #include "third_party/skia/include/core/SkXfermode.h" |
| 30 #include "ui/base/cursor/cursor_loader.h" | 30 #include "ui/base/cursor/cursor_loader.h" |
| 31 #include "ui/display/display.h" | 31 #include "ui/display/display.h" |
| 32 #include "ui/events/event.h" | 32 #include "ui/events/event.h" |
| 33 #include "ui/events/event_utils.h" | 33 #include "ui/events/event_utils.h" |
| 34 #include "ui/events/mojo/input_events_type_converters.h" | 34 #include "ui/events/mojo/input_events_type_converters.h" |
| 35 #include "ui/events/mojo/mojo_extended_key_event_data.h" | 35 #include "ui/events/mojo/mojo_extended_key_event_data.h" |
| 36 #include "ui/gfx/geometry/mojo/geometry_type_converters.h" | |
| 37 #include "ui/gfx/mojo/transform_type_converters.h" | 36 #include "ui/gfx/mojo/transform_type_converters.h" |
| 38 #include "ui/platform_window/platform_ime_controller.h" | 37 #include "ui/platform_window/platform_ime_controller.h" |
| 39 #include "ui/platform_window/platform_window.h" | 38 #include "ui/platform_window/platform_window.h" |
| 40 | 39 |
| 41 #if defined(OS_WIN) | 40 #if defined(OS_WIN) |
| 42 #include "ui/platform_window/win/win_window.h" | 41 #include "ui/platform_window/win/win_window.h" |
| 43 #elif defined(USE_X11) | 42 #elif defined(USE_X11) |
| 44 #include "ui/platform_window/x11/x11_window.h" | 43 #include "ui/platform_window/x11/x11_window.h" |
| 45 #elif defined(OS_ANDROID) | 44 #elif defined(OS_ANDROID) |
| 46 #include "ui/platform_window/android/platform_window_android.h" | 45 #include "ui/platform_window/android/platform_window_android.h" |
| 47 #elif defined(USE_OZONE) | 46 #elif defined(USE_OZONE) |
| 48 #include "ui/ozone/public/ozone_platform.h" | 47 #include "ui/ozone/public/ozone_platform.h" |
| 49 #endif | 48 #endif |
| 50 | 49 |
| 51 using mojo::Rect; | |
| 52 using mojo::Size; | |
| 53 | |
| 54 namespace mus { | 50 namespace mus { |
| 55 | 51 |
| 56 namespace ws { | 52 namespace ws { |
| 57 namespace { | 53 namespace { |
| 58 | 54 |
| 59 // DrawWindowTree recursively visits ServerWindows, creating a SurfaceDrawQuad | 55 // DrawWindowTree recursively visits ServerWindows, creating a SurfaceDrawQuad |
| 60 // for each that lacks one. A ServerWindow may hold a CompositorFrame that | 56 // for each that lacks one. A ServerWindow may hold a CompositorFrame that |
| 61 // references other ServerWindows in SurfaceDrawQuads. We should not create new | 57 // references other ServerWindows in SurfaceDrawQuads. We should not create new |
| 62 // SurfaceDrawQuads for these |referenced_window_ids|. Instead, | 58 // SurfaceDrawQuads for these |referenced_window_ids|. Instead, |
| 63 // cc::SurfaceAggregator will do the heavy lifting here by expanding those | 59 // cc::SurfaceAggregator will do the heavy lifting here by expanding those |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 425 |
| 430 void DefaultPlatformDisplay::RequestCopyOfOutput( | 426 void DefaultPlatformDisplay::RequestCopyOfOutput( |
| 431 std::unique_ptr<cc::CopyOutputRequest> output_request) { | 427 std::unique_ptr<cc::CopyOutputRequest> output_request) { |
| 432 if (display_compositor_) | 428 if (display_compositor_) |
| 433 display_compositor_->RequestCopyOfOutput(std::move(output_request)); | 429 display_compositor_->RequestCopyOfOutput(std::move(output_request)); |
| 434 } | 430 } |
| 435 | 431 |
| 436 } // namespace ws | 432 } // namespace ws |
| 437 | 433 |
| 438 } // namespace mus | 434 } // namespace mus |
| OLD | NEW |