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 <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 #include "content/public/common/sandbox_type.h" | 54 #include "content/public/common/sandbox_type.h" |
55 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 55 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
56 #include "content/public/common/service_manager_connection.h" | 56 #include "content/public/common/service_manager_connection.h" |
57 #include "content/public/common/service_names.mojom.h" | 57 #include "content/public/common/service_names.mojom.h" |
58 #include "gpu/command_buffer/service/gpu_preferences.h" | 58 #include "gpu/command_buffer/service/gpu_preferences.h" |
59 #include "gpu/command_buffer/service/gpu_switches.h" | 59 #include "gpu/command_buffer/service/gpu_switches.h" |
60 #include "gpu/ipc/service/switches.h" | 60 #include "gpu/ipc/service/switches.h" |
61 #include "ipc/ipc_channel_handle.h" | 61 #include "ipc/ipc_channel_handle.h" |
62 #include "ipc/message_filter.h" | 62 #include "ipc/message_filter.h" |
63 #include "media/base/media_switches.h" | 63 #include "media/base/media_switches.h" |
| 64 #include "media/media_features.h" |
64 #include "mojo/edk/embedder/embedder.h" | 65 #include "mojo/edk/embedder/embedder.h" |
65 #include "services/service_manager/public/cpp/connection.h" | 66 #include "services/service_manager/public/cpp/connection.h" |
66 #include "services/service_manager/public/cpp/interface_provider.h" | 67 #include "services/service_manager/public/cpp/interface_provider.h" |
67 #include "services/service_manager/runner/common/client_util.h" | 68 #include "services/service_manager/runner/common/client_util.h" |
68 #include "ui/base/ui_base_switches.h" | 69 #include "ui/base/ui_base_switches.h" |
69 #include "ui/events/latency_info.h" | 70 #include "ui/events/latency_info.h" |
70 #include "ui/gl/gl_switches.h" | 71 #include "ui/gl/gl_switches.h" |
71 | 72 |
72 #if defined(OS_ANDROID) | 73 #if defined(OS_ANDROID) |
73 #include "base/android/build_info.h" | 74 #include "base/android/build_info.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 static const char* const kSwitchNames[] = { | 111 static const char* const kSwitchNames[] = { |
111 switches::kCreateDefaultGLContext, | 112 switches::kCreateDefaultGLContext, |
112 switches::kDisableAcceleratedVideoDecode, | 113 switches::kDisableAcceleratedVideoDecode, |
113 switches::kDisableBreakpad, | 114 switches::kDisableBreakpad, |
114 switches::kDisableES3GLContext, | 115 switches::kDisableES3GLContext, |
115 switches::kDisableGpuSandbox, | 116 switches::kDisableGpuSandbox, |
116 switches::kDisableGpuWatchdog, | 117 switches::kDisableGpuWatchdog, |
117 switches::kDisableGLExtensions, | 118 switches::kDisableGLExtensions, |
118 switches::kDisableLogging, | 119 switches::kDisableLogging, |
119 switches::kDisableSeccompFilterSandbox, | 120 switches::kDisableSeccompFilterSandbox, |
120 #if defined(ENABLE_WEBRTC) | 121 #if BUILDFLAG(ENABLE_WEBRTC) |
121 switches::kDisableWebRtcHWEncoding, | 122 switches::kDisableWebRtcHWEncoding, |
122 #endif | 123 #endif |
123 #if defined(OS_WIN) | 124 #if defined(OS_WIN) |
124 switches::kEnableAcceleratedVpxDecode, | 125 switches::kEnableAcceleratedVpxDecode, |
125 #endif | 126 #endif |
126 switches::kEnableHeapProfiling, | 127 switches::kEnableHeapProfiling, |
127 switches::kEnableLogging, | 128 switches::kEnableLogging, |
128 #if defined(OS_CHROMEOS) | 129 #if defined(OS_CHROMEOS) |
129 switches::kDisableVaapiAcceleratedVideoEncode, | 130 switches::kDisableVaapiAcceleratedVideoEncode, |
130 #endif | 131 #endif |
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); | 1191 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); |
1191 ClientIdToShaderCacheMap::iterator iter = | 1192 ClientIdToShaderCacheMap::iterator iter = |
1192 client_id_to_shader_cache_.find(client_id); | 1193 client_id_to_shader_cache_.find(client_id); |
1193 // If the cache doesn't exist then this is an off the record profile. | 1194 // If the cache doesn't exist then this is an off the record profile. |
1194 if (iter == client_id_to_shader_cache_.end()) | 1195 if (iter == client_id_to_shader_cache_.end()) |
1195 return; | 1196 return; |
1196 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); | 1197 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); |
1197 } | 1198 } |
1198 | 1199 |
1199 } // namespace content | 1200 } // namespace content |
OLD | NEW |