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

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

Issue 2584363002: gpu: Move ContextProviderCommandBuffer into mus gpu client-lib. (Closed)
Patch Set: tot merge Created 4 years 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/test/DEPS ('k') | services/ui/public/cpp/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 "build/build_config.h" 14 #include "build/build_config.h"
15 #include "cc/output/copy_output_request.h" 15 #include "cc/output/copy_output_request.h"
16 #include "cc/test/pixel_test_output_surface.h" 16 #include "cc/test/pixel_test_output_surface.h"
17 #include "cc/test/test_compositor_frame_sink.h" 17 #include "cc/test/test_compositor_frame_sink.h"
18 #include "components/test_runner/test_common.h" 18 #include "components/test_runner/test_common.h"
19 #include "components/test_runner/web_frame_test_proxy.h" 19 #include "components/test_runner/web_frame_test_proxy.h"
20 #include "components/test_runner/web_view_test_proxy.h" 20 #include "components/test_runner/web_view_test_proxy.h"
21 #include "components/test_runner/web_widget_test_proxy.h" 21 #include "components/test_runner/web_widget_test_proxy.h"
22 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h" 22 #include "content/browser/bluetooth/bluetooth_device_chooser_controller.h"
23 #include "content/browser/renderer_host/render_process_host_impl.h" 23 #include "content/browser/renderer_host/render_process_host_impl.h"
24 #include "content/browser/renderer_host/render_widget_host_impl.h" 24 #include "content/browser/renderer_host/render_widget_host_impl.h"
25 #include "content/common/gpu/client/context_provider_command_buffer.h"
26 #include "content/common/renderer.mojom.h" 25 #include "content/common/renderer.mojom.h"
27 #include "content/common/site_isolation_policy.h" 26 #include "content/common/site_isolation_policy.h"
28 #include "content/public/common/page_state.h" 27 #include "content/public/common/page_state.h"
29 #include "content/public/renderer/renderer_gamepad_provider.h" 28 #include "content/public/renderer/renderer_gamepad_provider.h"
30 #include "content/renderer/fetchers/manifest_fetcher.h" 29 #include "content/renderer/fetchers/manifest_fetcher.h"
31 #include "content/renderer/gpu/render_widget_compositor.h" 30 #include "content/renderer/gpu/render_widget_compositor.h"
32 #include "content/renderer/history_entry.h" 31 #include "content/renderer/history_entry.h"
33 #include "content/renderer/history_serialization.h" 32 #include "content/renderer/history_serialization.h"
34 #include "content/renderer/input/render_widget_input_handler_delegate.h" 33 #include "content/renderer/input/render_widget_input_handler_delegate.h"
35 #include "content/renderer/layout_test_dependencies.h" 34 #include "content/renderer/layout_test_dependencies.h"
36 #include "content/renderer/render_frame_impl.h" 35 #include "content/renderer/render_frame_impl.h"
37 #include "content/renderer/render_thread_impl.h" 36 #include "content/renderer/render_thread_impl.h"
38 #include "content/renderer/render_view_impl.h" 37 #include "content/renderer/render_view_impl.h"
39 #include "content/renderer/render_widget.h" 38 #include "content/renderer/render_widget.h"
40 #include "content/renderer/renderer_blink_platform_impl.h" 39 #include "content/renderer/renderer_blink_platform_impl.h"
41 #include "content/shell/common/shell_switches.h" 40 #include "content/shell/common/shell_switches.h"
42 #include "gpu/ipc/service/image_transport_surface.h" 41 #include "gpu/ipc/service/image_transport_surface.h"
42 #include "services/ui/public/cpp/gpu/context_provider_command_buffer.h"
43 #include "third_party/WebKit/public/platform/WebFloatRect.h" 43 #include "third_party/WebKit/public/platform/WebFloatRect.h"
44 #include "third_party/WebKit/public/platform/WebGamepads.h" 44 #include "third_party/WebKit/public/platform/WebGamepads.h"
45 #include "third_party/WebKit/public/platform/WebInputEvent.h" 45 #include "third_party/WebKit/public/platform/WebInputEvent.h"
46 #include "third_party/WebKit/public/platform/WebRect.h" 46 #include "third_party/WebKit/public/platform/WebRect.h"
47 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic eMotionData.h" 47 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic eMotionData.h"
48 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic eOrientationData.h" 48 #include "third_party/WebKit/public/platform/modules/device_orientation/WebDevic eOrientationData.h"
49 #include "third_party/WebKit/public/platform/scheduler/test/renderer_scheduler_t est_support.h" 49 #include "third_party/WebKit/public/platform/scheduler/test/renderer_scheduler_t est_support.h"
50 #include "third_party/WebKit/public/web/WebHistoryItem.h" 50 #include "third_party/WebKit/public/web/WebHistoryItem.h"
51 #include "third_party/WebKit/public/web/WebView.h" 51 #include "third_party/WebKit/public/web/WebView.h"
52 #include "ui/events/blink/blink_event_util.h" 52 #include "ui/events/blink/blink_event_util.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 attributes.alpha_size = -1; 384 attributes.alpha_size = -1;
385 attributes.depth_size = 0; 385 attributes.depth_size = 0;
386 attributes.stencil_size = 0; 386 attributes.stencil_size = 0;
387 attributes.samples = 0; 387 attributes.samples = 0;
388 attributes.sample_buffers = 0; 388 attributes.sample_buffers = 0;
389 attributes.bind_generates_resource = false; 389 attributes.bind_generates_resource = false;
390 attributes.lose_context_when_out_of_memory = true; 390 attributes.lose_context_when_out_of_memory = true;
391 const bool automatic_flushes = false; 391 const bool automatic_flushes = false;
392 const bool support_locking = false; 392 const bool support_locking = false;
393 393
394 auto context_provider = make_scoped_refptr(new ContextProviderCommandBuffer( 394 auto context_provider =
395 gpu_channel_, gpu::GPU_STREAM_DEFAULT, gpu::GpuStreamPriority::NORMAL, 395 make_scoped_refptr(new ui::ContextProviderCommandBuffer(
396 gpu::kNullSurfaceHandle, 396 gpu_channel_, gpu::GPU_STREAM_DEFAULT,
397 GURL("chrome://gpu/" 397 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle,
398 "LayoutTestDependenciesImpl::CreateOutputSurface"), 398 GURL("chrome://gpu/"
399 automatic_flushes, support_locking, gpu::SharedMemoryLimits(), 399 "LayoutTestDependenciesImpl::CreateOutputSurface"),
400 attributes, nullptr, 400 automatic_flushes, support_locking, gpu::SharedMemoryLimits(),
401 command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_TESTING)); 401 attributes, nullptr,
402 ui::command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_TESTING));
402 context_provider->BindToCurrentThread(); 403 context_provider->BindToCurrentThread();
403 404
404 bool flipped_output_surface = false; 405 bool flipped_output_surface = false;
405 return base::MakeUnique<cc::PixelTestOutputSurface>( 406 return base::MakeUnique<cc::PixelTestOutputSurface>(
406 std::move(context_provider), flipped_output_surface); 407 std::move(context_provider), flipped_output_surface);
407 } 408 }
408 void DisplayReceivedCompositorFrame( 409 void DisplayReceivedCompositorFrame(
409 const cc::CompositorFrame& frame) override {} 410 const cc::CompositorFrame& frame) override {}
410 void DisplayWillDrawAndSwap( 411 void DisplayWillDrawAndSwap(
411 bool will_draw_and_swap, 412 bool will_draw_and_swap,
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 1136
1136 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) { 1137 void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) {
1137 if (auto* render_widget = 1138 if (auto* render_widget =
1138 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) { 1139 static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) {
1139 render_widget->UpdateTextInputState(ShowIme::IF_NEEDED, 1140 render_widget->UpdateTextInputState(ShowIme::IF_NEEDED,
1140 ChangeSource::FROM_NON_IME); 1141 ChangeSource::FROM_NON_IME);
1141 } 1142 }
1142 } 1143 }
1143 1144
1144 } // namespace content 1145 } // namespace content
OLDNEW
« no previous file with comments | « content/test/DEPS ('k') | services/ui/public/cpp/gpu/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698