| 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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1201 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
| 1198 ClientIdToShaderCacheMap::iterator iter = | 1202 ClientIdToShaderCacheMap::iterator iter = |
| 1199 client_id_to_shader_cache_.find(client_id); | 1203 client_id_to_shader_cache_.find(client_id); |
| 1200 // If the cache doesn't exist then this is an off the record profile. | 1204 // If the cache doesn't exist then this is an off the record profile. |
| 1201 if (iter == client_id_to_shader_cache_.end()) | 1205 if (iter == client_id_to_shader_cache_.end()) |
| 1202 return; | 1206 return; |
| 1203 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1207 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
| 1204 } | 1208 } |
| 1205 | 1209 |
| 1206 } // namespace content | 1210 } // namespace content |
| OLD | NEW |