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 <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/base64.h" | 11 #include "base/base64.h" |
12 #include "base/base_switches.h" | 12 #include "base/base_switches.h" |
13 #include "base/bind.h" | 13 #include "base/bind.h" |
14 #include "base/callback_helpers.h" | 14 #include "base/callback_helpers.h" |
15 #include "base/command_line.h" | 15 #include "base/command_line.h" |
16 #include "base/logging.h" | 16 #include "base/logging.h" |
17 #include "base/macros.h" | 17 #include "base/macros.h" |
18 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
19 #include "base/metrics/histogram.h" | 19 #include "base/metrics/histogram.h" |
20 #include "base/sha1.h" | 20 #include "base/sha1.h" |
21 #include "base/threading/thread.h" | 21 #include "base/threading/thread.h" |
22 #include "base/trace_event/trace_event.h" | 22 #include "base/trace_event/trace_event.h" |
23 #include "build/build_config.h" | 23 #include "build/build_config.h" |
24 #include "components/tracing/tracing_switches.h" | 24 #include "components/tracing/common/tracing_switches.h" |
25 #include "content/browser/browser_child_process_host_impl.h" | 25 #include "content/browser/browser_child_process_host_impl.h" |
26 #include "content/browser/gpu/compositor_util.h" | 26 #include "content/browser/gpu/compositor_util.h" |
27 #include "content/browser/gpu/gpu_data_manager_impl.h" | 27 #include "content/browser/gpu/gpu_data_manager_impl.h" |
28 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 28 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
29 #include "content/browser/gpu/shader_disk_cache.h" | 29 #include "content/browser/gpu/shader_disk_cache.h" |
30 #include "content/browser/mojo/mojo_application_host.h" | 30 #include "content/browser/mojo/mojo_application_host.h" |
31 #include "content/browser/renderer_host/render_widget_host_impl.h" | 31 #include "content/browser/renderer_host/render_widget_host_impl.h" |
32 #include "content/common/child_process_host_impl.h" | 32 #include "content/common/child_process_host_impl.h" |
33 #include "content/common/establish_channel_params.h" | 33 #include "content/common/establish_channel_params.h" |
34 #include "content/common/gpu_host_messages.h" | 34 #include "content/common/gpu_host_messages.h" |
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1172 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1173 ClientIdToShaderCacheMap::iterator iter = | 1173 ClientIdToShaderCacheMap::iterator iter = |
1174 client_id_to_shader_cache_.find(client_id); | 1174 client_id_to_shader_cache_.find(client_id); |
1175 // If the cache doesn't exist then this is an off the record profile. | 1175 // If the cache doesn't exist then this is an off the record profile. |
1176 if (iter == client_id_to_shader_cache_.end()) | 1176 if (iter == client_id_to_shader_cache_.end()) |
1177 return; | 1177 return; |
1178 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1178 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1179 } | 1179 } |
1180 | 1180 |
1181 } // namespace content | 1181 } // namespace content |
OLD | NEW |