| 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 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 GetShaderCacheFactorySingleton()->ClearByClientId( | 895 GetShaderCacheFactorySingleton()->ClearByClientId( |
| 896 cache_key.first, base::Time(), base::Time::Max(), base::Bind([] {})); | 896 cache_key.first, base::Time(), base::Time::Max(), base::Bind([] {})); |
| 897 } | 897 } |
| 898 } | 898 } |
| 899 SendOutstandingReplies(); | 899 SendOutstandingReplies(); |
| 900 RecordProcessCrash(); | 900 RecordProcessCrash(); |
| 901 GpuDataManagerImpl::GetInstance()->ProcessCrashed( | 901 GpuDataManagerImpl::GetInstance()->ProcessCrashed( |
| 902 process_->GetTerminationStatus(true /* known_dead */, NULL)); | 902 process_->GetTerminationStatus(true /* known_dead */, NULL)); |
| 903 } | 903 } |
| 904 | 904 |
| 905 void GpuProcessHost::DidInitialize(const gpu::GPUInfo& gpu_info) { | 905 void GpuProcessHost::DidInitialize( |
| 906 const gpu::GPUInfo& gpu_info, |
| 907 const gpu::GpuFeatureInfo& gpu_feature_info) { |
| 906 // TODO(sad): This should call OnInitialized(). | 908 // TODO(sad): This should call OnInitialized(). |
| 907 } | 909 } |
| 908 | 910 |
| 911 void GpuProcessHost::DidFailInitialize() { |
| 912 // TODO(sad): This should call GpuDataManagerImpl::OnGpuProcessInitFailure(). |
| 913 } |
| 914 |
| 909 void GpuProcessHost::DidCreateOffscreenContext(const GURL& url) { | 915 void GpuProcessHost::DidCreateOffscreenContext(const GURL& url) { |
| 910 urls_with_live_offscreen_contexts_.insert(url); | 916 urls_with_live_offscreen_contexts_.insert(url); |
| 911 } | 917 } |
| 912 | 918 |
| 913 void GpuProcessHost::DidDestroyOffscreenContext(const GURL& url) { | 919 void GpuProcessHost::DidDestroyOffscreenContext(const GURL& url) { |
| 914 urls_with_live_offscreen_contexts_.erase(url); | 920 urls_with_live_offscreen_contexts_.erase(url); |
| 915 } | 921 } |
| 916 | 922 |
| 917 void GpuProcessHost::DidDestroyChannel(int32_t client_id) { | 923 void GpuProcessHost::DidDestroyChannel(int32_t client_id) { |
| 918 TRACE_EVENT0("gpu", "GpuProcessHost::DidDestroyChannel"); | 924 TRACE_EVENT0("gpu", "GpuProcessHost::DidDestroyChannel"); |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 GetShaderCacheFactorySingleton()->Get(client_id); | 1259 GetShaderCacheFactorySingleton()->Get(client_id); |
| 1254 if (!cache.get()) | 1260 if (!cache.get()) |
| 1255 return; | 1261 return; |
| 1256 | 1262 |
| 1257 cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_)); | 1263 cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_)); |
| 1258 | 1264 |
| 1259 client_id_to_shader_cache_[client_id] = cache; | 1265 client_id_to_shader_cache_[client_id] = cache; |
| 1260 } | 1266 } |
| 1261 | 1267 |
| 1262 } // namespace content | 1268 } // namespace content |
| OLD | NEW |