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

Side by Side Diff: content/browser/gpu/browser_gpu_channel_host_factory.cc

Issue 2565243002: Revert of gpu: Move ShaderDiskCache into //gpu/ipc/host component. (Closed)
Patch Set: Created 4 years 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/browser/browser_main_loop.cc ('k') | content/browser/gpu/gpu_process_host.h » ('j') | 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/browser/gpu/browser_gpu_channel_host_factory.h" 5 #include "content/browser/gpu/browser_gpu_channel_host_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
11 #include "base/single_thread_task_runner.h" 11 #include "base/single_thread_task_runner.h"
12 #include "base/synchronization/waitable_event.h" 12 #include "base/synchronization/waitable_event.h"
13 #include "base/threading/thread_restrictions.h" 13 #include "base/threading/thread_restrictions.h"
14 #include "base/threading/thread_task_runner_handle.h" 14 #include "base/threading/thread_task_runner_handle.h"
15 #include "base/trace_event/memory_dump_manager.h" 15 #include "base/trace_event/memory_dump_manager.h"
16 #include "base/trace_event/trace_event.h" 16 #include "base/trace_event/trace_event.h"
17 #include "build/build_config.h" 17 #include "build/build_config.h"
18 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" 18 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h"
19 #include "content/browser/gpu/gpu_data_manager_impl.h" 19 #include "content/browser/gpu/gpu_data_manager_impl.h"
20 #include "content/browser/gpu/gpu_process_host.h" 20 #include "content/browser/gpu/gpu_process_host.h"
21 #include "content/browser/gpu/shader_disk_cache.h"
21 #include "content/common/child_process_host_impl.h" 22 #include "content/common/child_process_host_impl.h"
22 #include "content/public/browser/browser_thread.h" 23 #include "content/public/browser/browser_thread.h"
23 #include "content/public/browser/content_browser_client.h" 24 #include "content/public/browser/content_browser_client.h"
24 #include "content/public/browser/gpu_data_manager.h" 25 #include "content/public/browser/gpu_data_manager.h"
25 #include "content/public/common/content_client.h" 26 #include "content/public/common/content_client.h"
26 #include "gpu/command_buffer/service/gpu_switches.h" 27 #include "gpu/command_buffer/service/gpu_switches.h"
27 #include "gpu/ipc/common/gpu_messages.h" 28 #include "gpu/ipc/common/gpu_messages.h"
28 #include "gpu/ipc/host/shader_disk_cache.h"
29 #include "ipc/ipc_channel_handle.h" 29 #include "ipc/ipc_channel_handle.h"
30 #include "ipc/message_filter.h" 30 #include "ipc/message_filter.h"
31 #include "services/service_manager/runner/common/client_util.h" 31 #include "services/service_manager/runner/common/client_util.h"
32 32
33 namespace content { 33 namespace content {
34 34
35 BrowserGpuChannelHostFactory* BrowserGpuChannelHostFactory::instance_ = NULL; 35 BrowserGpuChannelHostFactory* BrowserGpuChannelHostFactory::instance_ = NULL;
36 36
37 class BrowserGpuChannelHostFactory::EstablishRequest 37 class BrowserGpuChannelHostFactory::EstablishRequest
38 : public base::RefCountedThreadSafe<EstablishRequest> { 38 : public base::RefCountedThreadSafe<EstablishRequest> {
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 GpuProcessHost* host = GpuProcessHost::FromID(host_id); 365 GpuProcessHost* host = GpuProcessHost::FromID(host_id);
366 if (host) 366 if (host)
367 host->AddFilter(filter.get()); 367 host->AddFilter(filter.get());
368 } 368 }
369 369
370 // static 370 // static
371 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO( 371 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO(
372 int gpu_client_id, 372 int gpu_client_id,
373 const base::FilePath& cache_dir) { 373 const base::FilePath& cache_dir) {
374 gpu::ShaderCacheFactory::GetInstance()->SetCacheInfo(gpu_client_id, 374 ShaderCacheFactory::GetInstance()->SetCacheInfo(gpu_client_id, cache_dir);
375 cache_dir);
376 } 375 }
377 376
378 } // namespace content 377 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/gpu/gpu_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698