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

Side by Side Diff: blimp/client/app/compositor/browser_compositor.cc

Issue 2297933002: blimp: Set up the CompositorDependencies for blimp in Chrome. (Closed)
Patch Set: retry gpu process failures after crbug.com/643282 Created 4 years, 3 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 | blimp/client/core/compositor/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "blimp/client/app/compositor/browser_compositor.h" 5 #include "blimp/client/app/compositor/browser_compositor.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "blimp/client/public/compositor/compositor_dependencies.h" 10 #include "blimp/client/public/compositor/compositor_dependencies.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 base::LazyInstance<SimpleTaskGraphRunner> g_task_graph_runner = 65 base::LazyInstance<SimpleTaskGraphRunner> g_task_graph_runner =
66 LAZY_INSTANCE_INITIALIZER; 66 LAZY_INSTANCE_INITIALIZER;
67 67
68 } // namespace 68 } // namespace
69 69
70 BrowserCompositor::BrowserCompositor( 70 BrowserCompositor::BrowserCompositor(
71 CompositorDependencies* compositor_dependencies) 71 CompositorDependencies* compositor_dependencies)
72 : compositor_dependencies_(compositor_dependencies), 72 : compositor_dependencies_(compositor_dependencies),
73 surface_id_allocator_(base::MakeUnique<cc::SurfaceIdAllocator>( 73 surface_id_allocator_(base::MakeUnique<cc::SurfaceIdAllocator>(
74 compositor_dependencies->AllocateSurfaceId())), 74 compositor_dependencies->AllocateSurfaceClientId())),
75 widget_(gfx::kNullAcceleratedWidget), 75 widget_(gfx::kNullAcceleratedWidget),
76 output_surface_request_pending_(false), 76 output_surface_request_pending_(false),
77 root_layer_(cc::Layer::Create()) { 77 root_layer_(cc::Layer::Create()) {
78 compositor_dependencies_->GetSurfaceManager()->RegisterSurfaceClientId( 78 compositor_dependencies_->GetSurfaceManager()->RegisterSurfaceClientId(
79 surface_id_allocator_->client_id()); 79 surface_id_allocator_->client_id());
80 80
81 cc::LayerTreeHost::InitParams params; 81 cc::LayerTreeHost::InitParams params;
82 params.client = this; 82 params.client = this;
83 params.gpu_memory_buffer_manager = 83 params.gpu_memory_buffer_manager =
84 compositor_dependencies_->GetGpuMemoryBufferManager(); 84 compositor_dependencies_->GetGpuMemoryBufferManager();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 base::MakeUnique<cc::SurfaceDisplayOutputSurface>( 199 base::MakeUnique<cc::SurfaceDisplayOutputSurface>(
200 compositor_dependencies_->GetSurfaceManager(), 200 compositor_dependencies_->GetSurfaceManager(),
201 surface_id_allocator_.get(), display_.get(), context_provider, 201 surface_id_allocator_.get(), display_.get(), context_provider,
202 nullptr); 202 nullptr);
203 203
204 host_->SetOutputSurface(std::move(delegated_output_surface)); 204 host_->SetOutputSurface(std::move(delegated_output_surface));
205 } 205 }
206 206
207 } // namespace client 207 } // namespace client
208 } // namespace blimp 208 } // namespace blimp
OLDNEW
« no previous file with comments | « no previous file | blimp/client/core/compositor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698