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