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/common/gpu/gpu_memory_manager.h" | 5 #include "content/common/gpu/gpu_memory_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 video_memory_usage_stats->bytes_allocated_historical_max = | 111 video_memory_usage_stats->bytes_allocated_historical_max = |
112 bytes_allocated_historical_max_; | 112 bytes_allocated_historical_max_; |
113 } | 113 } |
114 | 114 |
115 void GpuMemoryManager::SendUmaStatsToBrowser() { | 115 void GpuMemoryManager::SendUmaStatsToBrowser() { |
116 if (!channel_manager_) | 116 if (!channel_manager_) |
117 return; | 117 return; |
118 GPUMemoryUmaStats params; | 118 GPUMemoryUmaStats params; |
119 params.bytes_allocated_current = GetCurrentUsage(); | 119 params.bytes_allocated_current = GetCurrentUsage(); |
120 params.bytes_allocated_max = bytes_allocated_historical_max_; | 120 params.bytes_allocated_max = bytes_allocated_historical_max_; |
121 params.context_group_count = tracking_groups_.size(); | 121 params.context_group_count = static_cast<uint32_t>(tracking_groups_.size()); |
122 channel_manager_->Send(new GpuHostMsg_GpuMemoryUmaStats(params)); | 122 channel_manager_->Send(new GpuHostMsg_GpuMemoryUmaStats(params)); |
123 } | 123 } |
124 } // namespace content | 124 } // namespace content |
OLD | NEW |