| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 attributes.lose_context_when_out_of_memory = true; | 196 attributes.lose_context_when_out_of_memory = true; |
| 197 const bool automatic_flushes = false; | 197 const bool automatic_flushes = false; |
| 198 const bool support_locking = false; | 198 const bool support_locking = false; |
| 199 | 199 |
| 200 scoped_refptr<cc::ContextProvider> display_context_provider( | 200 scoped_refptr<cc::ContextProvider> display_context_provider( |
| 201 new ContextProviderCommandBuffer( | 201 new ContextProviderCommandBuffer( |
| 202 std::move(gpu_channel), gpu::GPU_STREAM_DEFAULT, | 202 std::move(gpu_channel), gpu::GPU_STREAM_DEFAULT, |
| 203 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, | 203 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, |
| 204 GURL( | 204 GURL( |
| 205 "chrome://gpu/LayoutTestDependenciesImpl::CreateOutputSurface"), | 205 "chrome://gpu/LayoutTestDependenciesImpl::CreateOutputSurface"), |
| 206 gl::PreferIntegratedGpu, automatic_flushes, support_locking, | 206 automatic_flushes, support_locking, gpu::SharedMemoryLimits(), |
| 207 gpu::SharedMemoryLimits(), attributes, nullptr, | 207 attributes, nullptr, |
| 208 command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_TESTING)); | 208 command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_TESTING)); |
| 209 | 209 |
| 210 cc::LayerTreeSettings settings = | 210 cc::LayerTreeSettings settings = |
| 211 RenderWidgetCompositor::GenerateLayerTreeSettings( | 211 RenderWidgetCompositor::GenerateLayerTreeSettings( |
| 212 *base::CommandLine::ForCurrentProcess(), deps, 1.f); | 212 *base::CommandLine::ForCurrentProcess(), deps, 1.f); |
| 213 | 213 |
| 214 return base::MakeUnique<cc::PixelTestDelegatingOutputSurface>( | 214 return base::MakeUnique<cc::PixelTestDelegatingOutputSurface>( |
| 215 std::move(compositor_context_provider), | 215 std::move(compositor_context_provider), |
| 216 std::move(worker_context_provider), std::move(display_context_provider), | 216 std::move(worker_context_provider), std::move(display_context_provider), |
| 217 settings.renderer_settings, deps->GetSharedBitmapManager(), | 217 settings.renderer_settings, deps->GetSharedBitmapManager(), |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 493 return result; | 493 return result; |
| 494 } | 494 } |
| 495 | 495 |
| 496 void SchedulerRunIdleTasks(const base::Closure& callback) { | 496 void SchedulerRunIdleTasks(const base::Closure& callback) { |
| 497 scheduler::RendererScheduler* scheduler = | 497 scheduler::RendererScheduler* scheduler = |
| 498 content::RenderThreadImpl::current()->GetRendererScheduler(); | 498 content::RenderThreadImpl::current()->GetRendererScheduler(); |
| 499 scheduler::RunIdleTasksForTesting(scheduler, callback); | 499 scheduler::RunIdleTasksForTesting(scheduler, callback); |
| 500 } | 500 } |
| 501 | 501 |
| 502 } // namespace content | 502 } // namespace content |
| OLD | NEW |