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