Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/surfaces/display_compositor.h" | 5 #include "services/ui/surfaces/display_compositor.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "cc/output/in_process_context_provider.h" | 9 #include "cc/output/in_process_context_provider.h" |
| 10 #include "cc/surfaces/surface.h" | 10 #include "cc/surfaces/surface.h" |
| 11 #include "gpu/command_buffer/client/shared_memory_limits.h" | 11 #include "gpu/command_buffer/client/shared_memory_limits.h" |
| 12 #include "gpu/ipc/gpu_in_process_thread_service.h" | 12 #include "gpu/ipc/gpu_in_process_thread_service.h" |
| 13 #include "mojo/public/cpp/bindings/strong_binding.h" | 13 #include "mojo/public/cpp/bindings/strong_binding.h" |
| 14 #include "services/ui/common/mus_gpu_memory_buffer_manager.h" | 14 #include "services/ui/common/mus_gpu_memory_buffer_manager.h" |
| 15 #include "services/ui/surfaces/gpu_compositor_frame_sink.h" | 15 #include "services/ui/surfaces/gpu_compositor_frame_sink.h" |
| 16 | 16 |
| 17 namespace ui { | 17 namespace ui { |
| 18 | 18 |
| 19 DisplayCompositor::DisplayCompositor( | 19 DisplayCompositor::DisplayCompositor( |
| 20 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service, | 20 scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service, |
| 21 std::unique_ptr<MusGpuMemoryBufferManager> gpu_memory_buffer_manager, | 21 std::unique_ptr<MusGpuMemoryBufferManager> gpu_memory_buffer_manager, |
| 22 gpu::ImageFactory* image_factory, | 22 gpu::ImageFactory* image_factory, |
| 23 cc::mojom::DisplayCompositorRequest request, | 23 cc::mojom::DisplayCompositorRequest request, |
| 24 cc::mojom::DisplayCompositorClientPtr client) | 24 cc::mojom::DisplayCompositorClientPtr client) |
| 25 : gpu_service_(std::move(gpu_service)), | 25 : manager_(true), |
|
vmpstr
2016/12/01 21:04:02
manager_(true /* use_references */)
kylechar
2016/12/01 22:49:58
Changed to enum.
| |
| 26 gpu_service_(std::move(gpu_service)), | |
| 26 gpu_memory_buffer_manager_(std::move(gpu_memory_buffer_manager)), | 27 gpu_memory_buffer_manager_(std::move(gpu_memory_buffer_manager)), |
| 27 image_factory_(image_factory), | 28 image_factory_(image_factory), |
| 28 client_(std::move(client)), | 29 client_(std::move(client)), |
| 29 reference_manager_(&manager_), | 30 reference_manager_(&manager_), |
| 30 binding_(this, std::move(request)) { | 31 binding_(this, std::move(request)) { |
| 31 manager_.AddObserver(this); | 32 manager_.AddObserver(this); |
| 32 } | 33 } |
| 33 | 34 |
| 34 void DisplayCompositor::CreateCompositorFrameSink( | 35 void DisplayCompositor::CreateCompositorFrameSink( |
| 35 const cc::FrameSinkId& frame_sink_id, | 36 const cc::FrameSinkId& frame_sink_id, |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 surface_id.local_frame_id()); | 168 surface_id.local_frame_id()); |
| 168 | 169 |
| 169 if (client_) | 170 if (client_) |
| 170 client_->OnSurfaceCreated(surface_id, frame_size, device_scale_factor); | 171 client_->OnSurfaceCreated(surface_id, frame_size, device_scale_factor); |
| 171 } | 172 } |
| 172 | 173 |
| 173 void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id, | 174 void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id, |
| 174 bool* changed) {} | 175 bool* changed) {} |
| 175 | 176 |
| 176 } // namespace ui | 177 } // namespace ui |
| OLD | NEW |