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

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

Issue 1900993002: Move SharedMemoryLimits out of WebGraphicsContext3DCommandBufferImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@limits
Patch Set: move-limits: . 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
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 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1056 DCHECK_LE(web_attributes.webGLVersion, 2u); 1056 DCHECK_LE(web_attributes.webGLVersion, 2u);
1057 if (web_attributes.webGLVersion == 1) 1057 if (web_attributes.webGLVersion == 1)
1058 attributes.context_type = gpu::gles2::CONTEXT_TYPE_WEBGL1; 1058 attributes.context_type = gpu::gles2::CONTEXT_TYPE_WEBGL1;
1059 else if (web_attributes.webGLVersion == 2) 1059 else if (web_attributes.webGLVersion == 2)
1060 attributes.context_type = gpu::gles2::CONTEXT_TYPE_WEBGL2; 1060 attributes.context_type = gpu::gles2::CONTEXT_TYPE_WEBGL2;
1061 1061
1062 bool share_resources = false; 1062 bool share_resources = false;
1063 bool automatic_flushes = true; 1063 bool automatic_flushes = true;
1064 // Prefer discrete GPU for WebGL. 1064 // Prefer discrete GPU for WebGL.
1065 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; 1065 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
1066 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
1067 1066
1068 scoped_refptr<ContextProviderCommandBuffer> provider( 1067 scoped_refptr<ContextProviderCommandBuffer> provider(
1069 new ContextProviderCommandBuffer( 1068 new ContextProviderCommandBuffer(
1070 base::WrapUnique(new WebGraphicsContext3DCommandBufferImpl( 1069 base::WrapUnique(new WebGraphicsContext3DCommandBufferImpl(
1071 gpu::kNullSurfaceHandle, GURL(top_document_web_url), 1070 gpu::kNullSurfaceHandle, GURL(top_document_web_url),
1072 gpu_channel_host.get(), attributes, gpu_preference, 1071 gpu_channel_host.get(), attributes, gpu_preference,
1073 share_resources, automatic_flushes, limits, share_context)), 1072 share_resources, automatic_flushes, share_context)),
1074 RENDERER_MAINTHREAD_CONTEXT)); 1073 gpu::SharedMemoryLimits(), RENDERER_MAINTHREAD_CONTEXT));
1075 if (!provider->BindToCurrentThread()) { 1074 if (!provider->BindToCurrentThread()) {
1076 // Collect Graphicsinfo if there is a context failure or it is failed 1075 // Collect Graphicsinfo if there is a context failure or it is failed
1077 // purposefully in case of layout tests. 1076 // purposefully in case of layout tests.
1078 Collect3DContextInformationOnFailure(gl_info, gpu_channel_host.get()); 1077 Collect3DContextInformationOnFailure(gl_info, gpu_channel_host.get());
1079 return nullptr; 1078 return nullptr;
1080 } 1079 }
1081 return new WebGraphicsContext3DProviderImpl(std::move(provider)); 1080 return new WebGraphicsContext3DProviderImpl(std::move(provider));
1082 } 1081 }
1083 1082
1084 //------------------------------------------------------------------------------ 1083 //------------------------------------------------------------------------------
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 } 1295 }
1297 1296
1298 //------------------------------------------------------------------------------ 1297 //------------------------------------------------------------------------------
1299 1298
1300 blink::WebTrialTokenValidator* 1299 blink::WebTrialTokenValidator*
1301 RendererBlinkPlatformImpl::trialTokenValidator() { 1300 RendererBlinkPlatformImpl::trialTokenValidator() {
1302 return &trial_token_validator_; 1301 return &trial_token_validator_;
1303 } 1302 }
1304 1303
1305 } // namespace content 1304 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698