| 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 #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" |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 host->CreateViewCommandBuffer( | 306 host->CreateViewCommandBuffer( |
| 307 surface, | 307 surface, |
| 308 surface_id, | 308 surface_id, |
| 309 gpu_client_id_, | 309 gpu_client_id_, |
| 310 init_params, | 310 init_params, |
| 311 request->route_id, | 311 request->route_id, |
| 312 base::Bind(&BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO, | 312 base::Bind(&BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO, |
| 313 request)); | 313 request)); |
| 314 } | 314 } |
| 315 | 315 |
| 316 IPC::AttachmentBroker* BrowserGpuChannelHostFactory::GetAttachmentBroker() { | |
| 317 return content::ChildProcessHost::GetAttachmentBroker(); | |
| 318 } | |
| 319 | |
| 320 // static | 316 // static |
| 321 void BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO( | 317 void BrowserGpuChannelHostFactory::CommandBufferCreatedOnIO( |
| 322 CreateRequest* request, CreateCommandBufferResult result) { | 318 CreateRequest* request, CreateCommandBufferResult result) { |
| 323 request->result = result; | 319 request->result = result; |
| 324 request->event.Signal(); | 320 request->event.Signal(); |
| 325 } | 321 } |
| 326 | 322 |
| 327 CreateCommandBufferResult BrowserGpuChannelHostFactory::CreateViewCommandBuffer( | 323 CreateCommandBufferResult BrowserGpuChannelHostFactory::CreateViewCommandBuffer( |
| 328 int32 surface_id, | 324 int32 surface_id, |
| 329 const GPUCreateCommandBufferConfig& init_params, | 325 const GPUCreateCommandBufferConfig& init_params, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 } | 436 } |
| 441 | 437 |
| 442 // static | 438 // static |
| 443 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO( | 439 void BrowserGpuChannelHostFactory::InitializeShaderDiskCacheOnIO( |
| 444 int gpu_client_id, | 440 int gpu_client_id, |
| 445 const base::FilePath& cache_dir) { | 441 const base::FilePath& cache_dir) { |
| 446 ShaderCacheFactory::GetInstance()->SetCacheInfo(gpu_client_id, cache_dir); | 442 ShaderCacheFactory::GetInstance()->SetCacheInfo(gpu_client_id, cache_dir); |
| 447 } | 443 } |
| 448 | 444 |
| 449 } // namespace content | 445 } // namespace content |
| OLD | NEW |