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

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

Issue 2106103005: Revert of Pass initial size and GPU preference via context attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 automatic_flushes, support_locking, gpu::SharedMemoryLimits(), 206 gl::PreferIntegratedGpu, automatic_flushes, support_locking,
207 attributes, nullptr, 207 gpu::SharedMemoryLimits(), 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
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
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | gpu/command_buffer/client/gl_in_process_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698