OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/mus_display_provider.h" | 5 #include "services/ui/surfaces/mus_display_provider.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/threading/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
12 #include "cc/base/switches.h" | 12 #include "cc/base/switches.h" |
13 #include "cc/output/in_process_context_provider.h" | 13 #include "cc/output/in_process_context_provider.h" |
14 #include "cc/output/texture_mailbox_deleter.h" | 14 #include "cc/output/texture_mailbox_deleter.h" |
15 #include "cc/scheduler/begin_frame_source.h" | 15 #include "cc/scheduler/begin_frame_source.h" |
16 #include "cc/surfaces/display.h" | 16 #include "cc/surfaces/display.h" |
17 #include "cc/surfaces/display_scheduler.h" | 17 #include "cc/surfaces/display_scheduler.h" |
18 #include "components/display_compositor/host_shared_bitmap_manager.h" | 18 #include "components/viz/display_compositor/host_shared_bitmap_manager.h" |
19 #include "gpu/command_buffer/client/shared_memory_limits.h" | 19 #include "gpu/command_buffer/client/shared_memory_limits.h" |
20 #include "gpu/command_buffer/service/image_factory.h" | 20 #include "gpu/command_buffer/service/image_factory.h" |
21 #include "services/ui/surfaces/display_output_surface.h" | 21 #include "services/ui/surfaces/display_output_surface.h" |
22 | 22 |
23 #if defined(USE_OZONE) | 23 #if defined(USE_OZONE) |
24 #include "gpu/command_buffer/client/gles2_interface.h" | 24 #include "gpu/command_buffer/client/gles2_interface.h" |
25 #include "services/ui/surfaces/display_output_surface_ozone.h" | 25 #include "services/ui/surfaces/display_output_surface_ozone.h" |
26 #endif | 26 #endif |
27 | 27 |
28 namespace ui { | 28 namespace ui { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 79 |
80 cc::RendererSettings settings; | 80 cc::RendererSettings settings; |
81 settings.show_overdraw_feedback = | 81 settings.show_overdraw_feedback = |
82 base::CommandLine::ForCurrentProcess()->HasSwitch( | 82 base::CommandLine::ForCurrentProcess()->HasSwitch( |
83 cc::switches::kShowOverdrawFeedback); | 83 cc::switches::kShowOverdrawFeedback); |
84 | 84 |
85 // The ownership of the BeginFrameSource is transfered to the caller. | 85 // The ownership of the BeginFrameSource is transfered to the caller. |
86 *begin_frame_source = std::move(synthetic_begin_frame_source); | 86 *begin_frame_source = std::move(synthetic_begin_frame_source); |
87 | 87 |
88 return base::MakeUnique<cc::Display>( | 88 return base::MakeUnique<cc::Display>( |
89 display_compositor::HostSharedBitmapManager::current(), | 89 viz::HostSharedBitmapManager::current(), gpu_memory_buffer_manager_.get(), |
90 gpu_memory_buffer_manager_.get(), settings, frame_sink_id, | 90 settings, frame_sink_id, begin_frame_source->get(), |
91 begin_frame_source->get(), std::move(display_output_surface), | 91 std::move(display_output_surface), std::move(scheduler), |
92 std::move(scheduler), | |
93 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get())); | 92 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get())); |
94 } | 93 } |
95 | 94 |
96 } // namespace ui | 95 } // namespace ui |
OLD | NEW |