| 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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 DCHECK_GT(web_attributes.webGLVersion, 0u); | 1078 DCHECK_GT(web_attributes.webGLVersion, 0u); |
| 1079 DCHECK_LE(web_attributes.webGLVersion, 2u); | 1079 DCHECK_LE(web_attributes.webGLVersion, 2u); |
| 1080 if (web_attributes.webGLVersion == 2) | 1080 if (web_attributes.webGLVersion == 2) |
| 1081 attributes.context_type = gpu::gles2::CONTEXT_TYPE_WEBGL2; | 1081 attributes.context_type = gpu::gles2::CONTEXT_TYPE_WEBGL2; |
| 1082 else | 1082 else |
| 1083 attributes.context_type = gpu::gles2::CONTEXT_TYPE_WEBGL1; | 1083 attributes.context_type = gpu::gles2::CONTEXT_TYPE_WEBGL1; |
| 1084 | 1084 |
| 1085 constexpr bool automatic_flushes = true; | 1085 constexpr bool automatic_flushes = true; |
| 1086 constexpr bool support_locking = false; | 1086 constexpr bool support_locking = false; |
| 1087 // Prefer discrete GPU for WebGL. | 1087 // Prefer discrete GPU for WebGL. |
| 1088 constexpr gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; | 1088 constexpr gl::GpuPreference gpu_preference = gl::PreferDiscreteGpu; |
| 1089 | 1089 |
| 1090 scoped_refptr<ContextProviderCommandBuffer> provider( | 1090 scoped_refptr<ContextProviderCommandBuffer> provider( |
| 1091 new ContextProviderCommandBuffer( | 1091 new ContextProviderCommandBuffer( |
| 1092 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, | 1092 std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, |
| 1093 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, | 1093 gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, |
| 1094 GURL(top_document_web_url), gpu_preference, automatic_flushes, | 1094 GURL(top_document_web_url), gpu_preference, automatic_flushes, |
| 1095 support_locking, gpu::SharedMemoryLimits(), attributes, share_context, | 1095 support_locking, gpu::SharedMemoryLimits(), attributes, share_context, |
| 1096 command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_WEBGL)); | 1096 command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_WEBGL)); |
| 1097 return new WebGraphicsContext3DProviderImpl(std::move(provider)); | 1097 return new WebGraphicsContext3DProviderImpl(std::move(provider)); |
| 1098 } | 1098 } |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1296 return &trial_token_validator_; | 1296 return &trial_token_validator_; |
| 1297 } | 1297 } |
| 1298 | 1298 |
| 1299 void RendererBlinkPlatformImpl::workerContextCreated( | 1299 void RendererBlinkPlatformImpl::workerContextCreated( |
| 1300 const v8::Local<v8::Context>& worker) { | 1300 const v8::Local<v8::Context>& worker) { |
| 1301 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( | 1301 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( |
| 1302 worker); | 1302 worker); |
| 1303 } | 1303 } |
| 1304 | 1304 |
| 1305 } // namespace content | 1305 } // namespace content |
| OLD | NEW |