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

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

Issue 2261623002: Make DrawingBuffer and Canvas2DLayerBridge be cc::TextureLayerClients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: webmailbox: fix-passrefptr Created 4 years, 4 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"
11 #include "base/guid.h" 11 #include "base/guid.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "base/location.h" 13 #include "base/location.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "base/memory/shared_memory.h" 16 #include "base/memory/shared_memory.h"
17 #include "base/metrics/histogram.h" 17 #include "base/metrics/histogram.h"
18 #include "base/numerics/safe_conversions.h" 18 #include "base/numerics/safe_conversions.h"
19 #include "base/single_thread_task_runner.h" 19 #include "base/single_thread_task_runner.h"
20 #include "base/strings/string_number_conversions.h" 20 #include "base/strings/string_number_conversions.h"
21 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
22 #include "base/threading/thread_task_runner_handle.h" 22 #include "base/threading/thread_task_runner_handle.h"
23 #include "build/build_config.h" 23 #include "build/build_config.h"
24 #include "components/url_formatter/url_formatter.h" 24 #include "components/url_formatter/url_formatter.h"
25 #include "content/child/blob_storage/webblobregistry_impl.h" 25 #include "content/child/blob_storage/webblobregistry_impl.h"
26 #include "content/child/child_shared_bitmap_manager.h"
26 #include "content/child/database_util.h" 27 #include "content/child/database_util.h"
27 #include "content/child/file_info_util.h" 28 #include "content/child/file_info_util.h"
28 #include "content/child/fileapi/webfilesystem_impl.h" 29 #include "content/child/fileapi/webfilesystem_impl.h"
29 #include "content/child/indexed_db/webidbfactory_impl.h" 30 #include "content/child/indexed_db/webidbfactory_impl.h"
30 #include "content/child/quota_dispatcher.h" 31 #include "content/child/quota_dispatcher.h"
31 #include "content/child/quota_message_filter.h" 32 #include "content/child/quota_message_filter.h"
32 #include "content/child/simple_webmimeregistry_impl.h" 33 #include "content/child/simple_webmimeregistry_impl.h"
33 #include "content/child/storage_util.h" 34 #include "content/child/storage_util.h"
34 #include "content/child/thread_safe_sender.h" 35 #include "content/child/thread_safe_sender.h"
35 #include "content/child/web_database_observer_impl.h" 36 #include "content/child/web_database_observer_impl.h"
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 RendererBlinkPlatformImpl::createSharedOffscreenGraphicsContext3DProvider() { 1125 RendererBlinkPlatformImpl::createSharedOffscreenGraphicsContext3DProvider() {
1125 scoped_refptr<ContextProviderCommandBuffer> provider = 1126 scoped_refptr<ContextProviderCommandBuffer> provider =
1126 RenderThreadImpl::current()->SharedMainThreadContextProvider(); 1127 RenderThreadImpl::current()->SharedMainThreadContextProvider();
1127 if (!provider) 1128 if (!provider)
1128 return nullptr; 1129 return nullptr;
1129 return new WebGraphicsContext3DProviderImpl(std::move(provider)); 1130 return new WebGraphicsContext3DProviderImpl(std::move(provider));
1130 } 1131 }
1131 1132
1132 //------------------------------------------------------------------------------ 1133 //------------------------------------------------------------------------------
1133 1134
1135 std::unique_ptr<cc::SharedBitmap>
1136 RendererBlinkPlatformImpl::allocateSharedBitmap(const blink::WebSize& size) {
1137 return ChildThreadImpl::current()
1138 ->shared_bitmap_manager()
1139 ->AllocateSharedBitmap(gfx::Size(size.width, size.height));
1140 }
1141
1142 //------------------------------------------------------------------------------
1143
1134 blink::WebCompositorSupport* RendererBlinkPlatformImpl::compositorSupport() { 1144 blink::WebCompositorSupport* RendererBlinkPlatformImpl::compositorSupport() {
1135 return &compositor_support_; 1145 return &compositor_support_;
1136 } 1146 }
1137 1147
1138 //------------------------------------------------------------------------------ 1148 //------------------------------------------------------------------------------
1139 1149
1140 blink::WebString RendererBlinkPlatformImpl::convertIDNToUnicode( 1150 blink::WebString RendererBlinkPlatformImpl::convertIDNToUnicode(
1141 const blink::WebString& host) { 1151 const blink::WebString& host) {
1142 return url_formatter::IDNToUnicode(host.utf8()); 1152 return url_formatter::IDNToUnicode(host.utf8());
1143 } 1153 }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 return &trial_token_validator_; 1327 return &trial_token_validator_;
1318 } 1328 }
1319 1329
1320 void RendererBlinkPlatformImpl::workerContextCreated( 1330 void RendererBlinkPlatformImpl::workerContextCreated(
1321 const v8::Local<v8::Context>& worker) { 1331 const v8::Local<v8::Context>& worker) {
1322 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( 1332 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
1323 worker); 1333 worker);
1324 } 1334 }
1325 1335
1326 } // namespace content 1336 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.h ('k') | third_party/WebKit/Source/core/frame/ImageBitmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698