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/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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 #include "content/renderer/mojo/blink_service_registry_impl.h" | 70 #include "content/renderer/mojo/blink_service_registry_impl.h" |
71 #include "content/renderer/render_thread_impl.h" | 71 #include "content/renderer/render_thread_impl.h" |
72 #include "content/renderer/renderer_clipboard_delegate.h" | 72 #include "content/renderer/renderer_clipboard_delegate.h" |
73 #include "content/renderer/screen_orientation/screen_orientation_observer.h" | 73 #include "content/renderer/screen_orientation/screen_orientation_observer.h" |
74 #include "content/renderer/webclipboard_impl.h" | 74 #include "content/renderer/webclipboard_impl.h" |
75 #include "content/renderer/webgraphicscontext3d_provider_impl.h" | 75 #include "content/renderer/webgraphicscontext3d_provider_impl.h" |
76 #include "content/renderer/webpublicsuffixlist_impl.h" | 76 #include "content/renderer/webpublicsuffixlist_impl.h" |
77 #include "gpu/command_buffer/client/gles2_interface.h" | 77 #include "gpu/command_buffer/client/gles2_interface.h" |
78 #include "gpu/config/gpu_info.h" | 78 #include "gpu/config/gpu_info.h" |
79 #include "gpu/ipc/client/gpu_channel_host.h" | 79 #include "gpu/ipc/client/gpu_channel_host.h" |
| 80 #include "gpu/ipc/common/gpu_stream_constants.h" |
80 #include "ipc/ipc_sync_message_filter.h" | 81 #include "ipc/ipc_sync_message_filter.h" |
81 #include "media/audio/audio_output_device.h" | 82 #include "media/audio/audio_output_device.h" |
82 #include "media/base/audio_hardware_config.h" | 83 #include "media/base/audio_hardware_config.h" |
83 #include "media/base/mime_util.h" | 84 #include "media/base/mime_util.h" |
84 #include "media/blink/webcontentdecryptionmodule_impl.h" | 85 #include "media/blink/webcontentdecryptionmodule_impl.h" |
85 #include "media/filters/stream_parser_factory.h" | 86 #include "media/filters/stream_parser_factory.h" |
86 #include "storage/common/database/database_identifier.h" | 87 #include "storage/common/database/database_identifier.h" |
87 #include "storage/common/quota/quota_types.h" | 88 #include "storage/common/quota/quota_types.h" |
88 #include "third_party/WebKit/public/platform/BlameContext.h" | 89 #include "third_party/WebKit/public/platform/BlameContext.h" |
89 #include "third_party/WebKit/public/platform/FilePathConversion.h" | 90 #include "third_party/WebKit/public/platform/FilePathConversion.h" |
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 else | 1068 else |
1068 attributes.context_type = gpu::gles2::CONTEXT_TYPE_WEBGL1; | 1069 attributes.context_type = gpu::gles2::CONTEXT_TYPE_WEBGL1; |
1069 | 1070 |
1070 bool automatic_flushes = true; | 1071 bool automatic_flushes = true; |
1071 // Prefer discrete GPU for WebGL. | 1072 // Prefer discrete GPU for WebGL. |
1072 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; | 1073 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; |
1073 const auto& gpu_info = gpu_channel_host->gpu_info(); | 1074 const auto& gpu_info = gpu_channel_host->gpu_info(); |
1074 | 1075 |
1075 scoped_refptr<ContextProviderCommandBuffer> provider( | 1076 scoped_refptr<ContextProviderCommandBuffer> provider( |
1076 new ContextProviderCommandBuffer( | 1077 new ContextProviderCommandBuffer( |
1077 std::move(gpu_channel_host), gpu::kNullSurfaceHandle, | 1078 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, |
| 1079 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, |
1078 GURL(top_document_web_url), gpu_preference, automatic_flushes, | 1080 GURL(top_document_web_url), gpu_preference, automatic_flushes, |
1079 gpu::SharedMemoryLimits(), attributes, share_context, | 1081 gpu::SharedMemoryLimits(), attributes, share_context, |
1080 command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_WEBGL)); | 1082 command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_WEBGL)); |
1081 if (!provider->BindToCurrentThread()) { | 1083 if (!provider->BindToCurrentThread()) { |
1082 // Collect Graphicsinfo if there is a context failure or it is failed | 1084 // Collect Graphicsinfo if there is a context failure or it is failed |
1083 // purposefully in case of layout tests. | 1085 // purposefully in case of layout tests. |
1084 Collect3DContextInformationOnFailure(gl_info, gpu_info); | 1086 Collect3DContextInformationOnFailure(gl_info, gpu_info); |
1085 return nullptr; | 1087 return nullptr; |
1086 } | 1088 } |
1087 return new WebGraphicsContext3DProviderImpl(std::move(provider)); | 1089 return new WebGraphicsContext3DProviderImpl(std::move(provider)); |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 } | 1304 } |
1303 | 1305 |
1304 //------------------------------------------------------------------------------ | 1306 //------------------------------------------------------------------------------ |
1305 | 1307 |
1306 blink::WebTrialTokenValidator* | 1308 blink::WebTrialTokenValidator* |
1307 RendererBlinkPlatformImpl::trialTokenValidator() { | 1309 RendererBlinkPlatformImpl::trialTokenValidator() { |
1308 return &trial_token_validator_; | 1310 return &trial_token_validator_; |
1309 } | 1311 } |
1310 | 1312 |
1311 } // namespace content | 1313 } // namespace content |
OLD | NEW |