| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 std::unique_ptr<cc::OutputSurface> display_output_surface( | 286 std::unique_ptr<cc::OutputSurface> display_output_surface( |
| 287 new cc::PixelTestOutputSurface( | 287 new cc::PixelTestOutputSurface( |
| 288 make_scoped_refptr(new ContextProviderCommandBuffer( | 288 make_scoped_refptr(new ContextProviderCommandBuffer( |
| 289 std::move(gpu_channel), gpu::GPU_STREAM_DEFAULT, | 289 std::move(gpu_channel), gpu::GPU_STREAM_DEFAULT, |
| 290 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, | 290 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, |
| 291 GURL("chrome://gpu/" | 291 GURL("chrome://gpu/" |
| 292 "LayoutTestDependenciesImpl::CreateOutputSurface"), | 292 "LayoutTestDependenciesImpl::CreateOutputSurface"), |
| 293 automatic_flushes, support_locking, gpu::SharedMemoryLimits(), | 293 automatic_flushes, support_locking, gpu::SharedMemoryLimits(), |
| 294 attributes, nullptr, | 294 attributes, nullptr, |
| 295 command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_TESTING)), | 295 command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_TESTING)), |
| 296 nullptr, flipped_output_surface)); | 296 flipped_output_surface)); |
| 297 | 297 |
| 298 auto* task_runner = deps->GetCompositorImplThreadTaskRunner().get(); | 298 auto* task_runner = deps->GetCompositorImplThreadTaskRunner().get(); |
| 299 bool synchronous_composite = !task_runner; | 299 bool synchronous_composite = !task_runner; |
| 300 if (!task_runner) | 300 if (!task_runner) |
| 301 task_runner = base::ThreadTaskRunnerHandle::Get().get(); | 301 task_runner = base::ThreadTaskRunnerHandle::Get().get(); |
| 302 | 302 |
| 303 cc::LayerTreeSettings settings = | 303 cc::LayerTreeSettings settings = |
| 304 RenderWidgetCompositor::GenerateLayerTreeSettings( | 304 RenderWidgetCompositor::GenerateLayerTreeSettings( |
| 305 *base::CommandLine::ForCurrentProcess(), deps, 1.f); | 305 *base::CommandLine::ForCurrentProcess(), deps, 1.f); |
| 306 | 306 |
| (...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1033 return result; | 1033 return result; |
| 1034 } | 1034 } |
| 1035 | 1035 |
| 1036 void SchedulerRunIdleTasks(const base::Closure& callback) { | 1036 void SchedulerRunIdleTasks(const base::Closure& callback) { |
| 1037 blink::scheduler::RendererScheduler* scheduler = | 1037 blink::scheduler::RendererScheduler* scheduler = |
| 1038 content::RenderThreadImpl::current()->GetRendererScheduler(); | 1038 content::RenderThreadImpl::current()->GetRendererScheduler(); |
| 1039 blink::scheduler::RunIdleTasksForTesting(scheduler, callback); | 1039 blink::scheduler::RunIdleTasksForTesting(scheduler, callback); |
| 1040 } | 1040 } |
| 1041 | 1041 |
| 1042 } // namespace content | 1042 } // namespace content |
| OLD | NEW |