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

Side by Side Diff: ui/compositor/test/in_process_context_factory.cc

Issue 2383373002: Reduce SurfaceIdAllocator usage and tie SurfaceFactory to a single FrameSinkId (Closed)
Patch Set: Fix TestRenderViewHost + Mac Created 4 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/compositor/test/in_process_context_factory.h" 5 #include "ui/compositor/test/in_process_context_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 display_output_surface->capabilities().max_frames_pending)); 187 display_output_surface->capabilities().max_frames_pending));
188 per_compositor_data_[compositor.get()] = base::MakeUnique<cc::Display>( 188 per_compositor_data_[compositor.get()] = base::MakeUnique<cc::Display>(
189 GetSharedBitmapManager(), GetGpuMemoryBufferManager(), 189 GetSharedBitmapManager(), GetGpuMemoryBufferManager(),
190 compositor->GetRendererSettings(), std::move(begin_frame_source), 190 compositor->GetRendererSettings(), std::move(begin_frame_source),
191 std::move(display_output_surface), std::move(scheduler), 191 std::move(display_output_surface), std::move(scheduler),
192 base::MakeUnique<cc::TextureMailboxDeleter>( 192 base::MakeUnique<cc::TextureMailboxDeleter>(
193 compositor->task_runner().get())); 193 compositor->task_runner().get()));
194 194
195 auto* display = per_compositor_data_[compositor.get()].get(); 195 auto* display = per_compositor_data_[compositor.get()].get();
196 auto compositor_frame_sink = base::MakeUnique<cc::DirectCompositorFrameSink>( 196 auto compositor_frame_sink = base::MakeUnique<cc::DirectCompositorFrameSink>(
197 surface_manager_, compositor->surface_id_allocator(), display, 197 compositor->frame_sink_id(), surface_manager_, display, context_provider,
198 context_provider, shared_worker_context_provider_); 198 shared_worker_context_provider_);
199 compositor->SetCompositorFrameSink(std::move(compositor_frame_sink)); 199 compositor->SetCompositorFrameSink(std::move(compositor_frame_sink));
200 } 200 }
201 201
202 std::unique_ptr<Reflector> InProcessContextFactory::CreateReflector( 202 std::unique_ptr<Reflector> InProcessContextFactory::CreateReflector(
203 Compositor* mirrored_compositor, 203 Compositor* mirrored_compositor,
204 Layer* mirroring_layer) { 204 Layer* mirroring_layer) {
205 return base::WrapUnique(new FakeReflector); 205 return base::WrapUnique(new FakeReflector);
206 } 206 }
207 207
208 void InProcessContextFactory::RemoveReflector(Reflector* reflector) { 208 void InProcessContextFactory::RemoveReflector(Reflector* reflector) {
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) { 278 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) {
279 observer_list_.AddObserver(observer); 279 observer_list_.AddObserver(observer);
280 } 280 }
281 281
282 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) { 282 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) {
283 observer_list_.RemoveObserver(observer); 283 observer_list_.RemoveObserver(observer);
284 } 284 }
285 285
286 } // namespace ui 286 } // namespace ui
OLDNEW
« ui/compositor/compositor.h ('K') | « ui/compositor/compositor_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698