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

Side by Side Diff: content/test/layouttest_support.cc

Issue 2193293004: cc: Make LayerTreeTests use a DelegatingRenderer and Display. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: display-layertreetest: withperftestsfix Created 4 years, 4 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/public/test/layouttest_support.h" 5 #include "content/public/test/layouttest_support.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 task_runner = base::ThreadTaskRunnerHandle::Get().get(); 257 task_runner = base::ThreadTaskRunnerHandle::Get().get();
258 258
259 cc::LayerTreeSettings settings = 259 cc::LayerTreeSettings settings =
260 RenderWidgetCompositor::GenerateLayerTreeSettings( 260 RenderWidgetCompositor::GenerateLayerTreeSettings(
261 *base::CommandLine::ForCurrentProcess(), deps, 1.f); 261 *base::CommandLine::ForCurrentProcess(), deps, 1.f);
262 262
263 auto output_surface = base::MakeUnique<cc::TestDelegatingOutputSurface>( 263 auto output_surface = base::MakeUnique<cc::TestDelegatingOutputSurface>(
264 std::move(compositor_context_provider), 264 std::move(compositor_context_provider),
265 std::move(worker_context_provider), std::move(display_output_surface), 265 std::move(worker_context_provider), std::move(display_output_surface),
266 deps->GetSharedBitmapManager(), deps->GetGpuMemoryBufferManager(), 266 deps->GetSharedBitmapManager(), deps->GetGpuMemoryBufferManager(),
267 settings.renderer_settings, task_runner, synchronous_composite); 267 settings.renderer_settings, task_runner, synchronous_composite,
268 false /* force_disable_reclaim_resources */);
268 output_surfaces_[routing_id] = output_surface.get(); 269 output_surfaces_[routing_id] = output_surface.get();
269 return std::move(output_surface); 270 return std::move(output_surface);
270 } 271 }
271 272
272 std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( 273 std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput(
273 int32_t routing_id, 274 int32_t routing_id,
274 std::unique_ptr<cc::CopyOutputRequest> request) override { 275 std::unique_ptr<cc::CopyOutputRequest> request) override {
275 // Note that we can't immediately check output_surfaces_, since it may not 276 // Note that we can't immediately check output_surfaces_, since it may not
276 // have been created yet. Instead, we wait until OnCommit to find the 277 // have been created yet. Instead, we wait until OnCommit to find the
277 // currently active OutputSurface for the given RenderWidget routing_id. 278 // currently active OutputSurface for the given RenderWidget routing_id.
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 return result; 570 return result;
570 } 571 }
571 572
572 void SchedulerRunIdleTasks(const base::Closure& callback) { 573 void SchedulerRunIdleTasks(const base::Closure& callback) {
573 scheduler::RendererScheduler* scheduler = 574 scheduler::RendererScheduler* scheduler =
574 content::RenderThreadImpl::current()->GetRendererScheduler(); 575 content::RenderThreadImpl::current()->GetRendererScheduler();
575 scheduler::RunIdleTasksForTesting(scheduler, callback); 576 scheduler::RunIdleTasksForTesting(scheduler, callback);
576 } 577 }
577 578
578 } // namespace content 579 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor_unittest.cc ('k') | services/ui/surfaces/display_compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698