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/gpu_process_host.h" | 5 #include "content/browser/gpu/gpu_process_host.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 606 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
607 options.priority = base::ThreadPriority::DISPLAY; | 607 options.priority = base::ThreadPriority::DISPLAY; |
608 #endif | 608 #endif |
609 in_process_gpu_thread_->StartWithOptions(options); | 609 in_process_gpu_thread_->StartWithOptions(options); |
610 | 610 |
611 OnProcessLaunched(); // Fake a callback that the process is ready. | 611 OnProcessLaunched(); // Fake a callback that the process is ready. |
612 } else if (!LaunchGpuProcess(&gpu_preferences)) { | 612 } else if (!LaunchGpuProcess(&gpu_preferences)) { |
613 return false; | 613 return false; |
614 } | 614 } |
615 | 615 |
| 616 process_->child_channel() |
| 617 ->GetAssociatedInterfaceSupport() |
| 618 ->GetRemoteAssociatedInterface(&gpu_main_ptr_); |
| 619 |
616 if (!Send(new GpuMsg_Initialize(gpu_preferences))) | 620 if (!Send(new GpuMsg_Initialize(gpu_preferences))) |
617 return false; | 621 return false; |
618 | 622 |
619 #if defined(USE_OZONE) | 623 #if defined(USE_OZONE) |
620 // Ozone needs to send the primary DRM device to GPU process as early as | 624 // Ozone needs to send the primary DRM device to GPU process as early as |
621 // possible to ensure the latter always has a valid device. crbug.com/608839 | 625 // possible to ensure the latter always has a valid device. crbug.com/608839 |
622 ui::OzonePlatform::GetInstance() | 626 ui::OzonePlatform::GetInstance() |
623 ->GetGpuPlatformSupportHost() | 627 ->GetGpuPlatformSupportHost() |
624 ->OnGpuProcessLaunched( | 628 ->OnGpuProcessLaunched( |
625 host_id_, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), | 629 host_id_, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1199 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1196 ClientIdToShaderCacheMap::iterator iter = | 1200 ClientIdToShaderCacheMap::iterator iter = |
1197 client_id_to_shader_cache_.find(client_id); | 1201 client_id_to_shader_cache_.find(client_id); |
1198 // If the cache doesn't exist then this is an off the record profile. | 1202 // If the cache doesn't exist then this is an off the record profile. |
1199 if (iter == client_id_to_shader_cache_.end()) | 1203 if (iter == client_id_to_shader_cache_.end()) |
1200 return; | 1204 return; |
1201 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1205 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1202 } | 1206 } |
1203 | 1207 |
1204 } // namespace content | 1208 } // namespace content |
OLD | NEW |