| 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 "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 // GPU process exits, assume something went wrong, and block their | 463 // GPU process exits, assume something went wrong, and block their |
| 464 // URLs from accessing client 3D APIs without prompting. | 464 // URLs from accessing client 3D APIs without prompting. |
| 465 BlockLiveOffscreenContexts(); | 465 BlockLiveOffscreenContexts(); |
| 466 | 466 |
| 467 UMA_HISTOGRAM_COUNTS_100("GPU.AtExitSurfaceCount", | 467 UMA_HISTOGRAM_COUNTS_100("GPU.AtExitSurfaceCount", |
| 468 GpuSurfaceTracker::Get()->GetSurfaceCount()); | 468 GpuSurfaceTracker::Get()->GetSurfaceCount()); |
| 469 UMA_HISTOGRAM_BOOLEAN("GPU.AtExitReceivedMemoryStats", | 469 UMA_HISTOGRAM_BOOLEAN("GPU.AtExitReceivedMemoryStats", |
| 470 uma_memory_stats_received_); | 470 uma_memory_stats_received_); |
| 471 | 471 |
| 472 if (uma_memory_stats_received_) { | 472 if (uma_memory_stats_received_) { |
| 473 UMA_HISTOGRAM_COUNTS_100("GPU.AtExitManagedMemoryClientCount", | |
| 474 uma_memory_stats_.client_count); | |
| 475 UMA_HISTOGRAM_COUNTS_100("GPU.AtExitContextGroupCount", | 473 UMA_HISTOGRAM_COUNTS_100("GPU.AtExitContextGroupCount", |
| 476 uma_memory_stats_.context_group_count); | 474 uma_memory_stats_.context_group_count); |
| 477 UMA_HISTOGRAM_CUSTOM_COUNTS( | 475 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 478 "GPU.AtExitMBytesAllocated", | 476 "GPU.AtExitMBytesAllocated", |
| 479 uma_memory_stats_.bytes_allocated_current / 1024 / 1024, 1, 2000, 50); | 477 uma_memory_stats_.bytes_allocated_current / 1024 / 1024, 1, 2000, 50); |
| 480 UMA_HISTOGRAM_CUSTOM_COUNTS( | 478 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 481 "GPU.AtExitMBytesAllocatedMax", | 479 "GPU.AtExitMBytesAllocatedMax", |
| 482 uma_memory_stats_.bytes_allocated_max / 1024 / 1024, 1, 2000, 50); | 480 uma_memory_stats_.bytes_allocated_max / 1024 / 1024, 1, 2000, 50); |
| 483 UMA_HISTOGRAM_CUSTOM_COUNTS( | 481 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 484 "GPU.AtExitMBytesLimit", | 482 "GPU.AtExitMBytesLimit", |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1173 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1171 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
| 1174 ClientIdToShaderCacheMap::iterator iter = | 1172 ClientIdToShaderCacheMap::iterator iter = |
| 1175 client_id_to_shader_cache_.find(client_id); | 1173 client_id_to_shader_cache_.find(client_id); |
| 1176 // If the cache doesn't exist then this is an off the record profile. | 1174 // If the cache doesn't exist then this is an off the record profile. |
| 1177 if (iter == client_id_to_shader_cache_.end()) | 1175 if (iter == client_id_to_shader_cache_.end()) |
| 1178 return; | 1176 return; |
| 1179 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1177 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
| 1180 } | 1178 } |
| 1181 | 1179 |
| 1182 } // namespace content | 1180 } // namespace content |
| OLD | NEW |