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

Side by Side Diff: content/renderer/renderer_blink_platform_impl.cc

Issue 1827123002: Move content/common/gpu/client to gpu/ipc/client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 8 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/render_widget_fullscreen_pepper.cc ('k') | content/test/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/renderer/renderer_blink_platform_impl.h" 5 #include "content/renderer/renderer_blink_platform_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 24 matching lines...) Expand all
35 #include "content/child/storage_util.h" 35 #include "content/child/storage_util.h"
36 #include "content/child/thread_safe_sender.h" 36 #include "content/child/thread_safe_sender.h"
37 #include "content/child/web_database_observer_impl.h" 37 #include "content/child/web_database_observer_impl.h"
38 #include "content/child/web_url_loader_impl.h" 38 #include "content/child/web_url_loader_impl.h"
39 #include "content/child/webblobregistry_impl.h" 39 #include "content/child/webblobregistry_impl.h"
40 #include "content/child/webfileutilities_impl.h" 40 #include "content/child/webfileutilities_impl.h"
41 #include "content/child/webmessageportchannel_impl.h" 41 #include "content/child/webmessageportchannel_impl.h"
42 #include "content/common/file_utilities_messages.h" 42 #include "content/common/file_utilities_messages.h"
43 #include "content/common/frame_messages.h" 43 #include "content/common/frame_messages.h"
44 #include "content/common/gpu/client/context_provider_command_buffer.h" 44 #include "content/common/gpu/client/context_provider_command_buffer.h"
45 #include "content/common/gpu/client/gpu_channel_host.h"
46 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" 45 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h"
47 #include "content/common/gpu_process_launch_causes.h" 46 #include "content/common/gpu_process_launch_causes.h"
48 #include "content/common/mime_registry_messages.h" 47 #include "content/common/mime_registry_messages.h"
49 #include "content/common/render_process_messages.h" 48 #include "content/common/render_process_messages.h"
50 #include "content/public/common/content_switches.h" 49 #include "content/public/common/content_switches.h"
51 #include "content/public/common/service_registry.h" 50 #include "content/public/common/service_registry.h"
52 #include "content/public/common/webplugininfo.h" 51 #include "content/public/common/webplugininfo.h"
53 #include "content/public/renderer/content_renderer_client.h" 52 #include "content/public/renderer/content_renderer_client.h"
54 #include "content/public/renderer/media_stream_utils.h" 53 #include "content/public/renderer/media_stream_utils.h"
55 #include "content/renderer/cache_storage/webserviceworkercachestorage_impl.h" 54 #include "content/renderer/cache_storage/webserviceworkercachestorage_impl.h"
(...skipping 12 matching lines...) Expand all
68 #include "content/renderer/media/renderer_webaudiodevice_impl.h" 67 #include "content/renderer/media/renderer_webaudiodevice_impl.h"
69 #include "content/renderer/media/renderer_webmidiaccessor_impl.h" 68 #include "content/renderer/media/renderer_webmidiaccessor_impl.h"
70 #include "content/renderer/media/rtc_certificate_generator.h" 69 #include "content/renderer/media/rtc_certificate_generator.h"
71 #include "content/renderer/render_thread_impl.h" 70 #include "content/renderer/render_thread_impl.h"
72 #include "content/renderer/renderer_clipboard_delegate.h" 71 #include "content/renderer/renderer_clipboard_delegate.h"
73 #include "content/renderer/screen_orientation/screen_orientation_observer.h" 72 #include "content/renderer/screen_orientation/screen_orientation_observer.h"
74 #include "content/renderer/webclipboard_impl.h" 73 #include "content/renderer/webclipboard_impl.h"
75 #include "content/renderer/webgraphicscontext3d_provider_impl.h" 74 #include "content/renderer/webgraphicscontext3d_provider_impl.h"
76 #include "content/renderer/webpublicsuffixlist_impl.h" 75 #include "content/renderer/webpublicsuffixlist_impl.h"
77 #include "gpu/config/gpu_info.h" 76 #include "gpu/config/gpu_info.h"
77 #include "gpu/ipc/client/gpu_channel_host.h"
78 #include "ipc/ipc_sync_message_filter.h" 78 #include "ipc/ipc_sync_message_filter.h"
79 #include "media/audio/audio_output_device.h" 79 #include "media/audio/audio_output_device.h"
80 #include "media/base/audio_hardware_config.h" 80 #include "media/base/audio_hardware_config.h"
81 #include "media/base/mime_util.h" 81 #include "media/base/mime_util.h"
82 #include "media/blink/webcontentdecryptionmodule_impl.h" 82 #include "media/blink/webcontentdecryptionmodule_impl.h"
83 #include "media/filters/stream_parser_factory.h" 83 #include "media/filters/stream_parser_factory.h"
84 #include "storage/common/database/database_identifier.h" 84 #include "storage/common/database/database_identifier.h"
85 #include "storage/common/quota/quota_types.h" 85 #include "storage/common/quota/quota_types.h"
86 #include "third_party/WebKit/public/platform/FilePathConversion.h" 86 #include "third_party/WebKit/public/platform/FilePathConversion.h"
87 #include "third_party/WebKit/public/platform/URLConversion.h" 87 #include "third_party/WebKit/public/platform/URLConversion.h"
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
626 } 626 }
627 627
628 WebString RendererBlinkPlatformImpl::databaseCreateOriginIdentifier( 628 WebString RendererBlinkPlatformImpl::databaseCreateOriginIdentifier(
629 const blink::WebSecurityOrigin& origin) { 629 const blink::WebSecurityOrigin& origin) {
630 return WebString::fromUTF8(storage::GetIdentifierFromOrigin( 630 return WebString::fromUTF8(storage::GetIdentifierFromOrigin(
631 WebSecurityOriginToGURL(origin))); 631 WebSecurityOriginToGURL(origin)));
632 } 632 }
633 633
634 bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() { 634 bool RendererBlinkPlatformImpl::canAccelerate2dCanvas() {
635 RenderThreadImpl* thread = RenderThreadImpl::current(); 635 RenderThreadImpl* thread = RenderThreadImpl::current();
636 GpuChannelHost* host = thread->EstablishGpuChannelSync( 636 gpu::GpuChannelHost* host =
637 CAUSE_FOR_GPU_LAUNCH_CANVAS_2D); 637 thread->EstablishGpuChannelSync(CAUSE_FOR_GPU_LAUNCH_CANVAS_2D);
638 if (!host) 638 if (!host)
639 return false; 639 return false;
640 640
641 return host->gpu_info().SupportsAccelerated2dCanvas(); 641 return host->gpu_info().SupportsAccelerated2dCanvas();
642 } 642 }
643 643
644 bool RendererBlinkPlatformImpl::isThreadedCompositingEnabled() { 644 bool RendererBlinkPlatformImpl::isThreadedCompositingEnabled() {
645 RenderThreadImpl* thread = RenderThreadImpl::current(); 645 RenderThreadImpl* thread = RenderThreadImpl::current();
646 // thread can be NULL in tests. 646 // thread can be NULL in tests.
647 return thread && thread->compositor_task_runner().get(); 647 return thread && thread->compositor_task_runner().get();
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 952
953 blink::WebSpeechSynthesizer* RendererBlinkPlatformImpl::createSpeechSynthesizer( 953 blink::WebSpeechSynthesizer* RendererBlinkPlatformImpl::createSpeechSynthesizer(
954 blink::WebSpeechSynthesizerClient* client) { 954 blink::WebSpeechSynthesizerClient* client) {
955 return GetContentClient()->renderer()->OverrideSpeechSynthesizer(client); 955 return GetContentClient()->renderer()->OverrideSpeechSynthesizer(client);
956 } 956 }
957 957
958 //------------------------------------------------------------------------------ 958 //------------------------------------------------------------------------------
959 959
960 static void Collect3DContextInformationOnFailure( 960 static void Collect3DContextInformationOnFailure(
961 blink::Platform::GraphicsInfo* gl_info, 961 blink::Platform::GraphicsInfo* gl_info,
962 GpuChannelHost* host) { 962 gpu::GpuChannelHost* host) {
963 DCHECK(gl_info); 963 DCHECK(gl_info);
964 std::string error_message("OffscreenContext Creation failed, "); 964 std::string error_message("OffscreenContext Creation failed, ");
965 if (host) { 965 if (host) {
966 const gpu::GPUInfo& gpu_info = host->gpu_info(); 966 const gpu::GPUInfo& gpu_info = host->gpu_info();
967 gl_info->vendorId = gpu_info.gpu.vendor_id; 967 gl_info->vendorId = gpu_info.gpu.vendor_id;
968 gl_info->deviceId = gpu_info.gpu.device_id; 968 gl_info->deviceId = gpu_info.gpu.device_id;
969 switch (gpu_info.context_info_state) { 969 switch (gpu_info.context_info_state) {
970 case gpu::kCollectInfoSuccess: 970 case gpu::kCollectInfoSuccess:
971 case gpu::kCollectInfoNonFatalFailure: 971 case gpu::kCollectInfoNonFatalFailure:
972 gl_info->rendererInfo = WebString::fromUTF8(gpu_info.gl_renderer); 972 gl_info->rendererInfo = WebString::fromUTF8(gpu_info.gl_renderer);
(...skipping 27 matching lines...) Expand all
1000 const blink::WebGraphicsContext3D::Attributes& web_attributes, 1000 const blink::WebGraphicsContext3D::Attributes& web_attributes,
1001 blink::WebGraphicsContext3DProvider* share_provider, 1001 blink::WebGraphicsContext3DProvider* share_provider,
1002 blink::Platform::GraphicsInfo* gl_info) { 1002 blink::Platform::GraphicsInfo* gl_info) {
1003 DCHECK(gl_info); 1003 DCHECK(gl_info);
1004 if (!RenderThreadImpl::current()) { 1004 if (!RenderThreadImpl::current()) {
1005 std::string error_message("Failed to run in Current RenderThreadImpl"); 1005 std::string error_message("Failed to run in Current RenderThreadImpl");
1006 gl_info->errorMessage = WebString::fromUTF8(error_message); 1006 gl_info->errorMessage = WebString::fromUTF8(error_message);
1007 return nullptr; 1007 return nullptr;
1008 } 1008 }
1009 1009
1010 scoped_refptr<GpuChannelHost> gpu_channel_host( 1010 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host(
1011 RenderThreadImpl::current()->EstablishGpuChannelSync( 1011 RenderThreadImpl::current()->EstablishGpuChannelSync(
1012 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ); 1012 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) );
1013 1013
1014 WebGraphicsContext3DCommandBufferImpl* share_context = 1014 WebGraphicsContext3DCommandBufferImpl* share_context =
1015 share_provider ? static_cast<WebGraphicsContext3DCommandBufferImpl*>( 1015 share_provider ? static_cast<WebGraphicsContext3DCommandBufferImpl*>(
1016 share_provider->context3d()) 1016 share_provider->context3d())
1017 : nullptr; 1017 : nullptr;
1018 1018
1019 gpu::gles2::ContextCreationAttribHelper attributes; 1019 gpu::gles2::ContextCreationAttribHelper attributes;
1020 // Defaults matching WebGraphicsContext3D::Attributes. 1020 // Defaults matching WebGraphicsContext3D::Attributes.
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1297 } 1297 }
1298 1298
1299 //------------------------------------------------------------------------------ 1299 //------------------------------------------------------------------------------
1300 1300
1301 blink::WebTrialTokenValidator* 1301 blink::WebTrialTokenValidator*
1302 RendererBlinkPlatformImpl::trialTokenValidator() { 1302 RendererBlinkPlatformImpl::trialTokenValidator() {
1303 return &trial_token_validator_; 1303 return &trial_token_validator_;
1304 } 1304 }
1305 1305
1306 } // namespace content 1306 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget_fullscreen_pepper.cc ('k') | content/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698