Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1111)

Side by Side Diff: services/ui/surfaces/mus_display_provider.cc

Issue 2867173002: Install HostSharedBitmapManager to cc::Display created by MusDisplayProvider (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "gpu/command_buffer/client/shared_memory_limits.h" 19 #include "gpu/command_buffer/client/shared_memory_limits.h"
19 #include "gpu/command_buffer/service/image_factory.h" 20 #include "gpu/command_buffer/service/image_factory.h"
20 #include "services/ui/surfaces/display_output_surface.h" 21 #include "services/ui/surfaces/display_output_surface.h"
21 22
22 #if defined(USE_OZONE) 23 #if defined(USE_OZONE)
23 #include "gpu/command_buffer/client/gles2_interface.h" 24 #include "gpu/command_buffer/client/gles2_interface.h"
24 #include "services/ui/surfaces/display_output_surface_ozone.h" 25 #include "services/ui/surfaces/display_output_surface_ozone.h"
25 #endif 26 #endif
26 27
27 namespace ui { 28 namespace ui {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 79
79 cc::RendererSettings settings; 80 cc::RendererSettings settings;
80 settings.show_overdraw_feedback = 81 settings.show_overdraw_feedback =
81 base::CommandLine::ForCurrentProcess()->HasSwitch( 82 base::CommandLine::ForCurrentProcess()->HasSwitch(
82 cc::switches::kShowOverdrawFeedback); 83 cc::switches::kShowOverdrawFeedback);
83 84
84 // The ownership of the BeginFrameSource is transfered to the caller. 85 // The ownership of the BeginFrameSource is transfered to the caller.
85 *begin_frame_source = std::move(synthetic_begin_frame_source); 86 *begin_frame_source = std::move(synthetic_begin_frame_source);
86 87
87 return base::MakeUnique<cc::Display>( 88 return base::MakeUnique<cc::Display>(
88 nullptr /* bitmap_manager */, gpu_memory_buffer_manager_.get(), settings, 89 display_compositor::HostSharedBitmapManager::current(),
89 frame_sink_id, begin_frame_source->get(), 90 gpu_memory_buffer_manager_.get(), settings, frame_sink_id,
90 std::move(display_output_surface), std::move(scheduler), 91 begin_frame_source->get(), std::move(display_output_surface),
92 std::move(scheduler),
91 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get())); 93 base::MakeUnique<cc::TextureMailboxDeleter>(task_runner_.get()));
92 } 94 }
93 95
94 } // namespace ui 96 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698