OLD | NEW |
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 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 5 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // Used to skip GpuChannelHost tests when there can be no GPU process. | 46 // Used to skip GpuChannelHost tests when there can be no GPU process. |
47 static bool CanUseForTesting(); | 47 static bool CanUseForTesting(); |
48 | 48 |
49 private: | 49 private: |
50 struct CreateRequest; | 50 struct CreateRequest; |
51 class EstablishRequest; | 51 class EstablishRequest; |
52 | 52 |
53 BrowserGpuChannelHostFactory(); | 53 BrowserGpuChannelHostFactory(); |
54 ~BrowserGpuChannelHostFactory() override; | 54 ~BrowserGpuChannelHostFactory() override; |
55 | 55 |
| 56 void InitializeShaderDiskCacheOnIO(); |
| 57 |
56 void GpuChannelEstablished(); | 58 void GpuChannelEstablished(); |
57 void CreateViewCommandBufferOnIO( | 59 void CreateViewCommandBufferOnIO( |
58 CreateRequest* request, | 60 CreateRequest* request, |
59 int32 surface_id, | 61 int32 surface_id, |
60 const GPUCreateCommandBufferConfig& init_params); | 62 const GPUCreateCommandBufferConfig& init_params); |
61 static void CommandBufferCreatedOnIO(CreateRequest* request, | 63 static void CommandBufferCreatedOnIO(CreateRequest* request, |
62 CreateCommandBufferResult result); | 64 CreateCommandBufferResult result); |
63 static void AddFilterOnIO(int gpu_host_id, | 65 static void AddFilterOnIO(int gpu_host_id, |
64 scoped_refptr<IPC::MessageFilter> filter); | 66 scoped_refptr<IPC::MessageFilter> filter); |
65 | 67 |
66 const int gpu_client_id_; | 68 const int gpu_client_id_; |
67 const uint64_t gpu_client_tracing_id_; | 69 const uint64_t gpu_client_tracing_id_; |
68 scoped_ptr<base::WaitableEvent> shutdown_event_; | 70 scoped_ptr<base::WaitableEvent> shutdown_event_; |
69 scoped_refptr<GpuChannelHost> gpu_channel_; | 71 scoped_refptr<GpuChannelHost> gpu_channel_; |
70 scoped_ptr<BrowserGpuMemoryBufferManager> gpu_memory_buffer_manager_; | 72 scoped_ptr<BrowserGpuMemoryBufferManager> gpu_memory_buffer_manager_; |
71 int gpu_host_id_; | 73 int gpu_host_id_; |
72 scoped_refptr<EstablishRequest> pending_request_; | 74 scoped_refptr<EstablishRequest> pending_request_; |
73 std::vector<base::Closure> established_callbacks_; | 75 std::vector<base::Closure> established_callbacks_; |
74 | 76 |
75 static BrowserGpuChannelHostFactory* instance_; | 77 static BrowserGpuChannelHostFactory* instance_; |
76 | 78 |
77 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); | 79 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); |
78 }; | 80 }; |
79 | 81 |
80 } // namespace content | 82 } // namespace content |
81 | 83 |
82 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ | 84 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ |
OLD | NEW |