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

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

Issue 2144393003: cc: Allow TestDelegatingOutputSurface to be used for non-pixel tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « services/ui/surfaces/display_compositor.cc ('k') | 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 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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 if (surface_manager_) { 170 if (surface_manager_) {
171 std::unique_ptr<cc::DelayBasedBeginFrameSource> begin_frame_source( 171 std::unique_ptr<cc::DelayBasedBeginFrameSource> begin_frame_source(
172 new cc::DelayBasedBeginFrameSource( 172 new cc::DelayBasedBeginFrameSource(
173 base::MakeUnique<cc::DelayBasedTimeSource>( 173 base::MakeUnique<cc::DelayBasedTimeSource>(
174 compositor->task_runner().get()))); 174 compositor->task_runner().get())));
175 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler( 175 std::unique_ptr<cc::DisplayScheduler> scheduler(new cc::DisplayScheduler(
176 begin_frame_source.get(), compositor->task_runner().get(), 176 begin_frame_source.get(), compositor->task_runner().get(),
177 display_output_surface->capabilities().max_frames_pending)); 177 display_output_surface->capabilities().max_frames_pending));
178 per_compositor_data_[compositor.get()] = base::MakeUnique<cc::Display>( 178 per_compositor_data_[compositor.get()] = base::MakeUnique<cc::Display>(
179 surface_manager_, GetSharedBitmapManager(), GetGpuMemoryBufferManager(), 179 GetSharedBitmapManager(), GetGpuMemoryBufferManager(),
180 compositor->GetRendererSettings(), 180 compositor->GetRendererSettings(), std::move(begin_frame_source),
181 compositor->surface_id_allocator()->client_id(), 181 std::move(display_output_surface), std::move(scheduler),
182 std::move(begin_frame_source), std::move(display_output_surface), 182 base::MakeUnique<cc::TextureMailboxDeleter>(
183 std::move(scheduler), base::MakeUnique<cc::TextureMailboxDeleter>( 183 compositor->task_runner().get()));
184 compositor->task_runner().get()));
185 184
186 auto* display = per_compositor_data_[compositor.get()].get(); 185 auto* display = per_compositor_data_[compositor.get()].get();
187 std::unique_ptr<cc::SurfaceDisplayOutputSurface> surface_output_surface( 186 std::unique_ptr<cc::SurfaceDisplayOutputSurface> surface_output_surface(
188 new cc::SurfaceDisplayOutputSurface( 187 new cc::SurfaceDisplayOutputSurface(
189 surface_manager_, compositor->surface_id_allocator(), display, 188 surface_manager_, compositor->surface_id_allocator(), display,
190 context_provider, shared_worker_context_provider_)); 189 context_provider, shared_worker_context_provider_));
191 compositor->SetOutputSurface(std::move(surface_output_surface)); 190 compositor->SetOutputSurface(std::move(surface_output_surface));
192 } else { 191 } else {
193 compositor->SetOutputSurface(std::move(display_output_surface)); 192 compositor->SetOutputSurface(std::move(display_output_surface));
194 } 193 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 269
271 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) { 270 void InProcessContextFactory::AddObserver(ContextFactoryObserver* observer) {
272 observer_list_.AddObserver(observer); 271 observer_list_.AddObserver(observer);
273 } 272 }
274 273
275 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) { 274 void InProcessContextFactory::RemoveObserver(ContextFactoryObserver* observer) {
276 observer_list_.RemoveObserver(observer); 275 observer_list_.RemoveObserver(observer);
277 } 276 }
278 277
279 } // namespace ui 278 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/surfaces/display_compositor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698