| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "services/ui/ws/platform_display_default.h" | 5 #include "services/ui/ws/platform_display_default.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "gpu/ipc/client/gpu_channel_host.h" | 10 #include "gpu/ipc/client/gpu_channel_host.h" |
| 11 #include "services/ui/display/screen_manager.h" | 11 #include "services/ui/display/screen_manager.h" |
| 12 #include "services/ui/public/interfaces/cursor/cursor_struct_traits.h" | 12 #include "services/ui/public/interfaces/cursor/cursor_struct_traits.h" |
| 13 #include "services/ui/ws/display_client_compositor_frame_sink.h" | |
| 14 #include "services/ui/ws/server_window.h" | 13 #include "services/ui/ws/server_window.h" |
| 15 #include "ui/base/cursor/image_cursors.h" | 14 #include "ui/base/cursor/image_cursors.h" |
| 16 #include "ui/display/display.h" | 15 #include "ui/display/display.h" |
| 17 #include "ui/events/event.h" | 16 #include "ui/events/event.h" |
| 18 #include "ui/events/event_utils.h" | 17 #include "ui/events/event_utils.h" |
| 19 #include "ui/platform_window/platform_ime_controller.h" | 18 #include "ui/platform_window/platform_ime_controller.h" |
| 20 #include "ui/platform_window/platform_window.h" | 19 #include "ui/platform_window/platform_window.h" |
| 21 | 20 |
| 22 #if defined(OS_WIN) | 21 #if defined(OS_WIN) |
| 23 #include "ui/platform_window/win/win_window.h" | 22 #include "ui/platform_window/win/win_window.h" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 cc::mojom::MojoCompositorFrameSinkClientPtr compositor_frame_sink_client; | 254 cc::mojom::MojoCompositorFrameSinkClientPtr compositor_frame_sink_client; |
| 256 cc::mojom::MojoCompositorFrameSinkClientRequest | 255 cc::mojom::MojoCompositorFrameSinkClientRequest |
| 257 compositor_frame_sink_client_request = | 256 compositor_frame_sink_client_request = |
| 258 mojo::MakeRequest(&compositor_frame_sink_client); | 257 mojo::MakeRequest(&compositor_frame_sink_client); |
| 259 | 258 |
| 260 root_window_->CreateRootCompositorFrameSink( | 259 root_window_->CreateRootCompositorFrameSink( |
| 261 widget_, mojo::MakeRequest(&compositor_frame_sink), | 260 widget_, mojo::MakeRequest(&compositor_frame_sink), |
| 262 std::move(compositor_frame_sink_client), | 261 std::move(compositor_frame_sink_client), |
| 263 mojo::MakeRequest(&display_private)); | 262 mojo::MakeRequest(&display_private)); |
| 264 | 263 |
| 265 auto display_client_compositor_frame_sink = | 264 frame_generator_ = base::MakeUnique<FrameGenerator>(); |
| 266 base::MakeUnique<DisplayClientCompositorFrameSink>( | 265 auto frame_sink_client_binding = |
| 267 root_window_->frame_sink_id(), std::move(compositor_frame_sink), | 266 base::MakeUnique<CompositorFrameSinkClientBinding>( |
| 268 std::move(display_private), | 267 frame_generator_.get(), |
| 269 std::move(compositor_frame_sink_client_request)); | 268 std::move(compositor_frame_sink_client_request), |
| 270 frame_generator_ = base::MakeUnique<FrameGenerator>( | 269 std::move(compositor_frame_sink), std::move(display_private)); |
| 271 std::move(display_client_compositor_frame_sink)); | 270 frame_generator_->Bind(std::move(frame_sink_client_binding)); |
| 272 frame_generator_->OnWindowSizeChanged(root_window_->bounds().size()); | 271 frame_generator_->OnWindowSizeChanged(root_window_->bounds().size()); |
| 273 frame_generator_->SetDeviceScaleFactor(metrics_.device_scale_factor); | 272 frame_generator_->SetDeviceScaleFactor(metrics_.device_scale_factor); |
| 274 } | 273 } |
| 275 | 274 |
| 276 void PlatformDisplayDefault::OnAcceleratedWidgetDestroyed() { | 275 void PlatformDisplayDefault::OnAcceleratedWidgetDestroyed() { |
| 277 NOTREACHED(); | 276 NOTREACHED(); |
| 278 } | 277 } |
| 279 | 278 |
| 280 void PlatformDisplayDefault::OnActivationChanged(bool active) {} | 279 void PlatformDisplayDefault::OnActivationChanged(bool active) {} |
| 281 | 280 |
| 282 } // namespace ws | 281 } // namespace ws |
| 283 } // namespace ui | 282 } // namespace ui |
| OLD | NEW |