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

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

Issue 1703163002: Remove dependency on GURL from content/common/gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
1031 } 1031 }
1032 1032
1033 scoped_refptr<GpuChannelHost> gpu_channel_host( 1033 scoped_refptr<GpuChannelHost> gpu_channel_host(
1034 RenderThreadImpl::current()->EstablishGpuChannelSync( 1034 RenderThreadImpl::current()->EstablishGpuChannelSync(
1035 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ); 1035 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) );
1036 1036
1037 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits; 1037 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
1038 bool lose_context_when_out_of_memory = false; 1038 bool lose_context_when_out_of_memory = false;
1039 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( 1039 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
1040 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( 1040 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
1041 gpu_channel_host.get(), 1041 gpu_channel_host.get(), attributes, lose_context_when_out_of_memory,
1042 attributes, 1042 attributes.topDocumentURL.utf8(), limits,
piman 2016/02/18 18:29:28 Is this equivalent, string.utf8() vs blink::WebStr
Mark Dittmer 2016/02/18 21:10:25 I'm having trouble reasoning about StringImpl and
1043 lose_context_when_out_of_memory,
1044 blink::WebStringToGURL(attributes.topDocumentURL),
1045 limits,
1046 static_cast<WebGraphicsContext3DCommandBufferImpl*>(share_context))); 1043 static_cast<WebGraphicsContext3DCommandBufferImpl*>(share_context)));
1047 1044
1048 // Most likely the GPU process exited and the attempt to reconnect to it 1045 // Most likely the GPU process exited and the attempt to reconnect to it
1049 // failed. Need to try to restore the context again later. 1046 // failed. Need to try to restore the context again later.
1050 if (!context || !context->InitializeOnCurrentThread() || 1047 if (!context || !context->InitializeOnCurrentThread() ||
1051 gl_info->testFailContext) { 1048 gl_info->testFailContext) {
1052 // Collect Graphicsinfo if there is a context failure or it is failed 1049 // Collect Graphicsinfo if there is a context failure or it is failed
1053 // purposefully in case of layout tests. 1050 // purposefully in case of layout tests.
1054 Collect3DContextInformationOnFailure(share_context, gl_info, 1051 Collect3DContextInformationOnFailure(share_context, gl_info,
1055 gpu_channel_host.get()); 1052 gpu_channel_host.get());
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 } 1296 }
1300 1297
1301 //------------------------------------------------------------------------------ 1298 //------------------------------------------------------------------------------
1302 1299
1303 blink::WebTrialTokenValidator* 1300 blink::WebTrialTokenValidator*
1304 RendererBlinkPlatformImpl::trialTokenValidator() { 1301 RendererBlinkPlatformImpl::trialTokenValidator() {
1305 return &trial_token_validator_; 1302 return &trial_token_validator_;
1306 } 1303 }
1307 1304
1308 } // namespace content 1305 } // namespace content
OLDNEW
« content/renderer/pepper/ppb_graphics_3d_impl.cc ('K') | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698