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

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

Issue 2814843002: gpu: GPU service scheduler. (Closed)
Patch Set: fix test dcheck failures Created 3 years, 7 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
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | gpu/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/memory/ptr_util.h" 12 #include "base/memory/ptr_util.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/threading/thread_task_runner_handle.h" 14 #include "base/threading/thread_task_runner_handle.h"
15 #include "build/build_config.h" 15 #include "build/build_config.h"
16 #include "cc/output/copy_output_request.h" 16 #include "cc/output/copy_output_request.h"
17 #include "cc/test/pixel_test_output_surface.h" 17 #include "cc/test/pixel_test_output_surface.h"
18 #include "cc/test/test_compositor_frame_sink.h" 18 #include "cc/test/test_compositor_frame_sink.h"
19 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h" 19 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h"
20 #include "content/browser/renderer_host/render_process_host_impl.h" 20 #include "content/browser/renderer_host/render_process_host_impl.h"
21 #include "content/browser/renderer_host/render_widget_host_impl.h" 21 #include "content/browser/renderer_host/render_widget_host_impl.h"
22 #include "content/child/request_extra_data.h" 22 #include "content/child/request_extra_data.h"
23 #include "content/common/gpu_stream_constants.h"
23 #include "content/common/renderer.mojom.h" 24 #include "content/common/renderer.mojom.h"
24 #include "content/public/common/page_state.h" 25 #include "content/public/common/page_state.h"
25 #include "content/public/common/screen_info.h" 26 #include "content/public/common/screen_info.h"
26 #include "content/public/renderer/renderer_gamepad_provider.h" 27 #include "content/public/renderer/renderer_gamepad_provider.h"
27 #include "content/renderer/fetchers/manifest_fetcher.h" 28 #include "content/renderer/fetchers/manifest_fetcher.h"
28 #include "content/renderer/gpu/render_widget_compositor.h" 29 #include "content/renderer/gpu/render_widget_compositor.h"
29 #include "content/renderer/history_entry.h" 30 #include "content/renderer/history_entry.h"
30 #include "content/renderer/history_serialization.h" 31 #include "content/renderer/history_serialization.h"
31 #include "content/renderer/input/render_widget_input_handler_delegate.h" 32 #include "content/renderer/input/render_widget_input_handler_delegate.h"
32 #include "content/renderer/layout_test_dependencies.h" 33 #include "content/renderer/layout_test_dependencies.h"
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 attributes.stencil_size = 0; 385 attributes.stencil_size = 0;
385 attributes.samples = 0; 386 attributes.samples = 0;
386 attributes.sample_buffers = 0; 387 attributes.sample_buffers = 0;
387 attributes.bind_generates_resource = false; 388 attributes.bind_generates_resource = false;
388 attributes.lose_context_when_out_of_memory = true; 389 attributes.lose_context_when_out_of_memory = true;
389 const bool automatic_flushes = false; 390 const bool automatic_flushes = false;
390 const bool support_locking = false; 391 const bool support_locking = false;
391 392
392 auto context_provider = 393 auto context_provider =
393 make_scoped_refptr(new ui::ContextProviderCommandBuffer( 394 make_scoped_refptr(new ui::ContextProviderCommandBuffer(
394 gpu_channel_, gpu::GPU_STREAM_DEFAULT, 395 gpu_channel_, kGpuStreamIdDefault, kGpuStreamPriorityDefault,
395 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, 396 gpu::kNullSurfaceHandle,
396 GURL("chrome://gpu/" 397 GURL("chrome://gpu/"
397 "LayoutTestDependenciesImpl::CreateOutputSurface"), 398 "LayoutTestDependenciesImpl::CreateOutputSurface"),
398 automatic_flushes, support_locking, gpu::SharedMemoryLimits(), 399 automatic_flushes, support_locking, gpu::SharedMemoryLimits(),
399 attributes, nullptr, 400 attributes, nullptr,
400 ui::command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_TESTING)); 401 ui::command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_TESTING));
401 context_provider->BindToCurrentThread(); 402 context_provider->BindToCurrentThread();
402 403
403 bool flipped_output_surface = false; 404 bool flipped_output_surface = false;
404 return base::MakeUnique<cc::PixelTestOutputSurface>( 405 return base::MakeUnique<cc::PixelTestOutputSurface>(
405 std::move(context_provider), flipped_output_surface); 406 std::move(context_provider), flipped_output_surface);
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 } 599 }
599 } 600 }
600 601
601 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) { 602 bool IsNavigationInitiatedByRenderer(const blink::WebURLRequest& request) {
602 RequestExtraData* extra_data = 603 RequestExtraData* extra_data =
603 static_cast<RequestExtraData*>(request.GetExtraData()); 604 static_cast<RequestExtraData*>(request.GetExtraData());
604 return extra_data && extra_data->navigation_initiated_by_renderer(); 605 return extra_data && extra_data->navigation_initiated_by_renderer();
605 } 606 }
606 607
607 } // namespace content 608 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | gpu/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698