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 2364633003: color: Set GpuMemoryBuffer color spaces for Canvas (Closed)
Patch Set: Fix constexpr Created 4 years, 2 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_macros.h" 17 #include "base/metrics/histogram_macros.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_gpu_memory_buffer_manager.h"
26 #include "content/child/child_shared_bitmap_manager.h" 27 #include "content/child/child_shared_bitmap_manager.h"
27 #include "content/child/database_util.h" 28 #include "content/child/database_util.h"
28 #include "content/child/file_info_util.h" 29 #include "content/child/file_info_util.h"
29 #include "content/child/fileapi/webfilesystem_impl.h" 30 #include "content/child/fileapi/webfilesystem_impl.h"
30 #include "content/child/indexed_db/webidbfactory_impl.h" 31 #include "content/child/indexed_db/webidbfactory_impl.h"
31 #include "content/child/quota_dispatcher.h" 32 #include "content/child/quota_dispatcher.h"
32 #include "content/child/quota_message_filter.h" 33 #include "content/child/quota_message_filter.h"
33 #include "content/child/simple_webmimeregistry_impl.h" 34 #include "content/child/simple_webmimeregistry_impl.h"
34 #include "content/child/storage_util.h" 35 #include "content/child/storage_util.h"
35 #include "content/child/thread_safe_sender.h" 36 #include "content/child/thread_safe_sender.h"
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 return nullptr; 1135 return nullptr;
1135 1136
1136 bool is_software_rendering = host->gpu_info().software_rendering; 1137 bool is_software_rendering = host->gpu_info().software_rendering;
1137 1138
1138 return new WebGraphicsContext3DProviderImpl(std::move(provider), 1139 return new WebGraphicsContext3DProviderImpl(std::move(provider),
1139 is_software_rendering); 1140 is_software_rendering);
1140 } 1141 }
1141 1142
1142 //------------------------------------------------------------------------------ 1143 //------------------------------------------------------------------------------
1143 1144
1145 gpu::GpuMemoryBufferManager*
1146 RendererBlinkPlatformImpl::getGpuMemoryBufferManager() {
1147 return ChildThreadImpl::current()->gpu_memory_buffer_manager();
1148 }
1149
1150 //------------------------------------------------------------------------------
1151
1144 std::unique_ptr<cc::SharedBitmap> 1152 std::unique_ptr<cc::SharedBitmap>
1145 RendererBlinkPlatformImpl::allocateSharedBitmap(const blink::WebSize& size) { 1153 RendererBlinkPlatformImpl::allocateSharedBitmap(const blink::WebSize& size) {
1146 return ChildThreadImpl::current() 1154 return ChildThreadImpl::current()
1147 ->shared_bitmap_manager() 1155 ->shared_bitmap_manager()
1148 ->AllocateSharedBitmap(gfx::Size(size.width, size.height)); 1156 ->AllocateSharedBitmap(gfx::Size(size.width, size.height));
1149 } 1157 }
1150 1158
1151 //------------------------------------------------------------------------------ 1159 //------------------------------------------------------------------------------
1152 1160
1153 blink::WebCompositorSupport* RendererBlinkPlatformImpl::compositorSupport() { 1161 blink::WebCompositorSupport* RendererBlinkPlatformImpl::compositorSupport() {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1336 return &trial_token_validator_; 1344 return &trial_token_validator_;
1337 } 1345 }
1338 1346
1339 void RendererBlinkPlatformImpl::workerContextCreated( 1347 void RendererBlinkPlatformImpl::workerContextCreated(
1340 const v8::Local<v8::Context>& worker) { 1348 const v8::Local<v8::Context>& worker) {
1341 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( 1349 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
1342 worker); 1350 worker);
1343 } 1351 }
1344 1352
1345 } // namespace content 1353 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698