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 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 IPC_MESSAGE_HANDLER(GpuHostMsg_GpuMemoryUmaStats, | 575 IPC_MESSAGE_HANDLER(GpuHostMsg_GpuMemoryUmaStats, |
576 OnGpuMemoryUmaStatsReceived) | 576 OnGpuMemoryUmaStatsReceived) |
577 #if defined(OS_MACOSX) | 577 #if defined(OS_MACOSX) |
578 IPC_MESSAGE_HANDLER_GENERIC(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, | 578 IPC_MESSAGE_HANDLER_GENERIC(GpuHostMsg_AcceleratedSurfaceBuffersSwapped, |
579 OnAcceleratedSurfaceBuffersSwapped(message)) | 579 OnAcceleratedSurfaceBuffersSwapped(message)) |
580 #endif | 580 #endif |
581 IPC_MESSAGE_HANDLER(GpuHostMsg_DestroyChannel, | 581 IPC_MESSAGE_HANDLER(GpuHostMsg_DestroyChannel, |
582 OnDestroyChannel) | 582 OnDestroyChannel) |
583 IPC_MESSAGE_HANDLER(GpuHostMsg_CacheShader, | 583 IPC_MESSAGE_HANDLER(GpuHostMsg_CacheShader, |
584 OnCacheShader) | 584 OnCacheShader) |
585 | |
586 IPC_MESSAGE_UNHANDLED(RouteOnUIThread(message)) | 585 IPC_MESSAGE_UNHANDLED(RouteOnUIThread(message)) |
587 IPC_END_MESSAGE_MAP() | 586 IPC_END_MESSAGE_MAP() |
588 | 587 |
589 return true; | 588 return true; |
590 } | 589 } |
591 | 590 |
592 void GpuProcessHost::OnChannelConnected(int32 peer_pid) { | 591 void GpuProcessHost::OnChannelConnected(int32 peer_pid) { |
593 TRACE_EVENT0("gpu", "GpuProcessHost::OnChannelConnected"); | 592 TRACE_EVENT0("gpu", "GpuProcessHost::OnChannelConnected"); |
594 | 593 |
595 while (!queued_messages_.empty()) { | 594 while (!queued_messages_.empty()) { |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1062 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1064 ClientIdToShaderCacheMap::iterator iter = | 1063 ClientIdToShaderCacheMap::iterator iter = |
1065 client_id_to_shader_cache_.find(client_id); | 1064 client_id_to_shader_cache_.find(client_id); |
1066 // If the cache doesn't exist then this is an off the record profile. | 1065 // If the cache doesn't exist then this is an off the record profile. |
1067 if (iter == client_id_to_shader_cache_.end()) | 1066 if (iter == client_id_to_shader_cache_.end()) |
1068 return; | 1067 return; |
1069 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1068 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1070 } | 1069 } |
1071 | 1070 |
1072 } // namespace content | 1071 } // namespace content |
OLD | NEW |