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

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

Issue 1937313003: Hide WebGraphicsContext3DCommandBufferImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: construct: . Created 4 years, 7 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.cc ('k') | no next file » | 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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 else 1068 else
1069 attributes.context_type = gpu::gles2::CONTEXT_TYPE_WEBGL1; 1069 attributes.context_type = gpu::gles2::CONTEXT_TYPE_WEBGL1;
1070 1070
1071 bool automatic_flushes = true; 1071 bool automatic_flushes = true;
1072 // Prefer discrete GPU for WebGL. 1072 // Prefer discrete GPU for WebGL.
1073 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; 1073 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
1074 const auto& gpu_info = gpu_channel_host->gpu_info(); 1074 const auto& gpu_info = gpu_channel_host->gpu_info();
1075 1075
1076 scoped_refptr<ContextProviderCommandBuffer> provider( 1076 scoped_refptr<ContextProviderCommandBuffer> provider(
1077 new ContextProviderCommandBuffer( 1077 new ContextProviderCommandBuffer(
1078 base::WrapUnique(new WebGraphicsContext3DCommandBufferImpl( 1078 std::move(gpu_channel_host), gpu::kNullSurfaceHandle,
1079 gpu::kNullSurfaceHandle, GURL(top_document_web_url), 1079 GURL(top_document_web_url), gpu_preference, automatic_flushes,
1080 std::move(gpu_channel_host), gpu_preference, automatic_flushes)),
1081 gpu::SharedMemoryLimits(), attributes, share_context, 1080 gpu::SharedMemoryLimits(), attributes, share_context,
1082 command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_WEBGL)); 1081 command_buffer_metrics::OFFSCREEN_CONTEXT_FOR_WEBGL));
1083 if (!provider->BindToCurrentThread()) { 1082 if (!provider->BindToCurrentThread()) {
1084 // Collect Graphicsinfo if there is a context failure or it is failed 1083 // Collect Graphicsinfo if there is a context failure or it is failed
1085 // purposefully in case of layout tests. 1084 // purposefully in case of layout tests.
1086 Collect3DContextInformationOnFailure(gl_info, gpu_info); 1085 Collect3DContextInformationOnFailure(gl_info, gpu_info);
1087 return nullptr; 1086 return nullptr;
1088 } 1087 }
1089 return new WebGraphicsContext3DProviderImpl(std::move(provider)); 1088 return new WebGraphicsContext3DProviderImpl(std::move(provider));
1090 } 1089 }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 } 1303 }
1305 1304
1306 //------------------------------------------------------------------------------ 1305 //------------------------------------------------------------------------------
1307 1306
1308 blink::WebTrialTokenValidator* 1307 blink::WebTrialTokenValidator*
1309 RendererBlinkPlatformImpl::trialTokenValidator() { 1308 RendererBlinkPlatformImpl::trialTokenValidator() {
1310 return &trial_token_validator_; 1309 return &trial_token_validator_;
1311 } 1310 }
1312 1311
1313 } // namespace content 1312 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698