Chromium Code Reviews| 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" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 255 cc::mojom::MojoCompositorFrameSinkClientPtr compositor_frame_sink_client; | 255 cc::mojom::MojoCompositorFrameSinkClientPtr compositor_frame_sink_client; |
| 256 cc::mojom::MojoCompositorFrameSinkClientRequest | 256 cc::mojom::MojoCompositorFrameSinkClientRequest |
| 257 compositor_frame_sink_client_request = | 257 compositor_frame_sink_client_request = |
| 258 mojo::MakeRequest(&compositor_frame_sink_client); | 258 mojo::MakeRequest(&compositor_frame_sink_client); |
| 259 | 259 |
| 260 root_window_->CreateRootCompositorFrameSink( | 260 root_window_->CreateRootCompositorFrameSink( |
| 261 widget_, mojo::MakeRequest(&compositor_frame_sink), | 261 widget_, mojo::MakeRequest(&compositor_frame_sink), |
| 262 std::move(compositor_frame_sink_client), | 262 std::move(compositor_frame_sink_client), |
| 263 mojo::MakeRequest(&display_private)); | 263 mojo::MakeRequest(&display_private)); |
| 264 | 264 |
| 265 auto display_client_compositor_frame_sink = | 265 frame_generator_ = base::MakeUnique<FrameGenerator>(); |
| 266 base::MakeUnique<DisplayClientCompositorFrameSink>( | 266 auto frame_sink_client_binding = |
|
Fady Samuel
2017/05/17 20:08:18
Do you still need DisplayClientCompositorFrameSink
Alex Z.
2017/05/17 20:21:18
Done.
| |
| 267 root_window_->frame_sink_id(), std::move(compositor_frame_sink), | 267 base::MakeUnique<DefaultCompositorFrameSinkClientBinding>( |
| 268 std::move(display_private), | 268 frame_generator_.get(), |
| 269 std::move(compositor_frame_sink_client_request)); | 269 std::move(compositor_frame_sink_client_request), |
| 270 frame_generator_ = base::MakeUnique<FrameGenerator>( | 270 std::move(compositor_frame_sink), std::move(display_private)); |
| 271 std::move(display_client_compositor_frame_sink)); | 271 frame_generator_->Bind(std::move(frame_sink_client_binding)); |
| 272 frame_generator_->OnWindowSizeChanged(root_window_->bounds().size()); | 272 frame_generator_->OnWindowSizeChanged(root_window_->bounds().size()); |
| 273 frame_generator_->SetDeviceScaleFactor(metrics_.device_scale_factor); | 273 frame_generator_->SetDeviceScaleFactor(metrics_.device_scale_factor); |
| 274 } | 274 } |
| 275 | 275 |
| 276 void PlatformDisplayDefault::OnAcceleratedWidgetDestroyed() { | 276 void PlatformDisplayDefault::OnAcceleratedWidgetDestroyed() { |
| 277 NOTREACHED(); | 277 NOTREACHED(); |
| 278 } | 278 } |
| 279 | 279 |
| 280 void PlatformDisplayDefault::OnActivationChanged(bool active) {} | 280 void PlatformDisplayDefault::OnActivationChanged(bool active) {} |
| 281 | 281 |
| 282 } // namespace ws | 282 } // namespace ws |
| 283 } // namespace ui | 283 } // namespace ui |
| OLD | NEW |