| 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 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 void GpuProcessHost::OnGpuMemoryUmaStatsReceived( | 872 void GpuProcessHost::OnGpuMemoryUmaStatsReceived( |
| 873 const GPUMemoryUmaStats& stats) { | 873 const GPUMemoryUmaStats& stats) { |
| 874 TRACE_EVENT0("gpu", "GpuProcessHost::OnGpuMemoryUmaStatsReceived"); | 874 TRACE_EVENT0("gpu", "GpuProcessHost::OnGpuMemoryUmaStatsReceived"); |
| 875 uma_memory_stats_received_ = true; | 875 uma_memory_stats_received_ = true; |
| 876 uma_memory_stats_ = stats; | 876 uma_memory_stats_ = stats; |
| 877 } | 877 } |
| 878 | 878 |
| 879 #if defined(OS_MACOSX) | 879 #if defined(OS_MACOSX) |
| 880 void GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped( | 880 void GpuProcessHost::OnAcceleratedSurfaceBuffersSwapped( |
| 881 const IPC::Message& message) { | 881 const IPC::Message& message) { |
| 882 RenderWidgetResizeHelper::Get()->PostGpuProcessMsg(host_id_, message); | 882 RenderWidgetResizeHelper::PostGpuProcessMsg(host_id_, message); |
| 883 } | 883 } |
| 884 #endif | 884 #endif |
| 885 | 885 |
| 886 void GpuProcessHost::OnProcessLaunched() { | 886 void GpuProcessHost::OnProcessLaunched() { |
| 887 UMA_HISTOGRAM_TIMES("GPU.GPUProcessLaunchTime", | 887 UMA_HISTOGRAM_TIMES("GPU.GPUProcessLaunchTime", |
| 888 base::TimeTicks::Now() - init_start_time_); | 888 base::TimeTicks::Now() - init_start_time_); |
| 889 } | 889 } |
| 890 | 890 |
| 891 void GpuProcessHost::OnProcessLaunchFailed() { | 891 void GpuProcessHost::OnProcessLaunchFailed() { |
| 892 RecordProcessCrash(); | 892 RecordProcessCrash(); |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1154 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1154 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
| 1155 ClientIdToShaderCacheMap::iterator iter = | 1155 ClientIdToShaderCacheMap::iterator iter = |
| 1156 client_id_to_shader_cache_.find(client_id); | 1156 client_id_to_shader_cache_.find(client_id); |
| 1157 // If the cache doesn't exist then this is an off the record profile. | 1157 // If the cache doesn't exist then this is an off the record profile. |
| 1158 if (iter == client_id_to_shader_cache_.end()) | 1158 if (iter == client_id_to_shader_cache_.end()) |
| 1159 return; | 1159 return; |
| 1160 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1160 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
| 1161 } | 1161 } |
| 1162 | 1162 |
| 1163 } // namespace content | 1163 } // namespace content |
| OLD | NEW |