| OLD | NEW |
| 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 Loading... |
| 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 */); | |
| 269 output_surfaces_[routing_id] = output_surface.get(); | 268 output_surfaces_[routing_id] = output_surface.get(); |
| 270 return std::move(output_surface); | 269 return std::move(output_surface); |
| 271 } | 270 } |
| 272 | 271 |
| 273 std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( | 272 std::unique_ptr<cc::SwapPromise> RequestCopyOfOutput( |
| 274 int32_t routing_id, | 273 int32_t routing_id, |
| 275 std::unique_ptr<cc::CopyOutputRequest> request) override { | 274 std::unique_ptr<cc::CopyOutputRequest> request) override { |
| 276 // Note that we can't immediately check output_surfaces_, since it may not | 275 // Note that we can't immediately check output_surfaces_, since it may not |
| 277 // have been created yet. Instead, we wait until OnCommit to find the | 276 // have been created yet. Instead, we wait until OnCommit to find the |
| 278 // currently active OutputSurface for the given RenderWidget routing_id. | 277 // currently active OutputSurface for the given RenderWidget routing_id. |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 return result; | 569 return result; |
| 571 } | 570 } |
| 572 | 571 |
| 573 void SchedulerRunIdleTasks(const base::Closure& callback) { | 572 void SchedulerRunIdleTasks(const base::Closure& callback) { |
| 574 scheduler::RendererScheduler* scheduler = | 573 scheduler::RendererScheduler* scheduler = |
| 575 content::RenderThreadImpl::current()->GetRendererScheduler(); | 574 content::RenderThreadImpl::current()->GetRendererScheduler(); |
| 576 scheduler::RunIdleTasksForTesting(scheduler, callback); | 575 scheduler::RunIdleTasksForTesting(scheduler, callback); |
| 577 } | 576 } |
| 578 | 577 |
| 579 } // namespace content | 578 } // namespace content |
| OLD | NEW |