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

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

Issue 1568073002: Reduce string copies in GURL creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 #include "gpu/config/gpu_info.h" 74 #include "gpu/config/gpu_info.h"
75 #include "ipc/ipc_sync_message_filter.h" 75 #include "ipc/ipc_sync_message_filter.h"
76 #include "media/audio/audio_output_device.h" 76 #include "media/audio/audio_output_device.h"
77 #include "media/base/audio_hardware_config.h" 77 #include "media/base/audio_hardware_config.h"
78 #include "media/base/key_systems.h" 78 #include "media/base/key_systems.h"
79 #include "media/base/mime_util.h" 79 #include "media/base/mime_util.h"
80 #include "media/blink/webcontentdecryptionmodule_impl.h" 80 #include "media/blink/webcontentdecryptionmodule_impl.h"
81 #include "media/filters/stream_parser_factory.h" 81 #include "media/filters/stream_parser_factory.h"
82 #include "storage/common/database/database_identifier.h" 82 #include "storage/common/database/database_identifier.h"
83 #include "storage/common/quota/quota_types.h" 83 #include "storage/common/quota/quota_types.h"
84 #include "third_party/WebKit/public/platform/URLConversion.h"
84 #include "third_party/WebKit/public/platform/WebBatteryStatusListener.h" 85 #include "third_party/WebKit/public/platform/WebBatteryStatusListener.h"
85 #include "third_party/WebKit/public/platform/WebBlobRegistry.h" 86 #include "third_party/WebKit/public/platform/WebBlobRegistry.h"
86 #include "third_party/WebKit/public/platform/WebDeviceLightListener.h" 87 #include "third_party/WebKit/public/platform/WebDeviceLightListener.h"
87 #include "third_party/WebKit/public/platform/WebFileInfo.h" 88 #include "third_party/WebKit/public/platform/WebFileInfo.h"
88 #include "third_party/WebKit/public/platform/WebGamepads.h" 89 #include "third_party/WebKit/public/platform/WebGamepads.h"
89 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h" 90 #include "third_party/WebKit/public/platform/WebMediaStreamCenter.h"
90 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h" 91 #include "third_party/WebKit/public/platform/WebMediaStreamCenterClient.h"
91 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h" 92 #include "third_party/WebKit/public/platform/WebPluginListBuilder.h"
92 #include "third_party/WebKit/public/platform/WebURL.h" 93 #include "third_party/WebKit/public/platform/WebURL.h"
93 #include "third_party/WebKit/public/platform/WebVector.h" 94 #include "third_party/WebKit/public/platform/WebVector.h"
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
1018 RenderThreadImpl::current()->EstablishGpuChannelSync( 1019 RenderThreadImpl::current()->EstablishGpuChannelSync(
1019 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ); 1020 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) );
1020 1021
1021 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits; 1022 WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits limits;
1022 bool lose_context_when_out_of_memory = false; 1023 bool lose_context_when_out_of_memory = false;
1023 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( 1024 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context(
1024 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext( 1025 WebGraphicsContext3DCommandBufferImpl::CreateOffscreenContext(
1025 gpu_channel_host.get(), 1026 gpu_channel_host.get(),
1026 attributes, 1027 attributes,
1027 lose_context_when_out_of_memory, 1028 lose_context_when_out_of_memory,
1028 GURL(attributes.topDocumentURL), 1029 blink::WebStringToGURL(attributes.topDocumentURL),
1029 limits, 1030 limits,
1030 static_cast<WebGraphicsContext3DCommandBufferImpl*>(share_context))); 1031 static_cast<WebGraphicsContext3DCommandBufferImpl*>(share_context)));
1031 1032
1032 // Most likely the GPU process exited and the attempt to reconnect to it 1033 // Most likely the GPU process exited and the attempt to reconnect to it
1033 // failed. Need to try to restore the context again later. 1034 // failed. Need to try to restore the context again later.
1034 if (!context || !context->InitializeOnCurrentThread() || 1035 if (!context || !context->InitializeOnCurrentThread() ||
1035 gl_info->testFailContext) { 1036 gl_info->testFailContext) {
1036 // Collect Graphicsinfo if there is a context failure or it is failed 1037 // Collect Graphicsinfo if there is a context failure or it is failed
1037 // purposefully in case of layout tests. 1038 // purposefully in case of layout tests.
1038 Collect3DContextInformationOnFailure(share_context, gl_info, 1039 Collect3DContextInformationOnFailure(share_context, gl_info,
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 //------------------------------------------------------------------------------ 1277 //------------------------------------------------------------------------------
1277 1278
1278 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting( 1279 void RendererBlinkPlatformImpl::MockBatteryStatusChangedForTesting(
1279 const blink::WebBatteryStatus& status) { 1280 const blink::WebBatteryStatus& status) {
1280 if (!g_test_battery_status_listener) 1281 if (!g_test_battery_status_listener)
1281 return; 1282 return;
1282 g_test_battery_status_listener->updateBatteryStatus(status); 1283 g_test_battery_status_listener->updateBatteryStatus(status);
1283 } 1284 }
1284 1285
1285 } // namespace content 1286 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698