Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 1644763002: Add virtual layout test for GPU accelerated decoding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use virtual mediasource-play in SmokeTests. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 bool GpuProcessHost::hardware_gpu_enabled_ = true; 101 bool GpuProcessHost::hardware_gpu_enabled_ = true;
102 int GpuProcessHost::gpu_crash_count_ = 0; 102 int GpuProcessHost::gpu_crash_count_ = 0;
103 int GpuProcessHost::gpu_recent_crash_count_ = 0; 103 int GpuProcessHost::gpu_recent_crash_count_ = 0;
104 bool GpuProcessHost::crashed_before_ = false; 104 bool GpuProcessHost::crashed_before_ = false;
105 int GpuProcessHost::swiftshader_crash_count_ = 0; 105 int GpuProcessHost::swiftshader_crash_count_ = 0;
106 106
107 namespace { 107 namespace {
108 108
109 // Command-line switches to propagate to the GPU process. 109 // Command-line switches to propagate to the GPU process.
110 static const char* const kSwitchNames[] = { 110 static const char* const kSwitchNames[] = {
111 switches::kDisableAcceleratedVideoDecode, 111 switches::kDisableAcceleratedVideoDecode,
Dirk Pranke 2016/07/21 20:45:05 is this indentation change correct?
chcunningham 2016/07/21 21:04:36 This was what clang-format generated. I vote we go
112 switches::kDisableBreakpad, 112 switches::kDisableBreakpad,
113 switches::kDisableGpuSandbox, 113 switches::kDisableGpuSandbox,
114 switches::kDisableGpuWatchdog, 114 switches::kDisableGpuWatchdog,
115 switches::kDisableGLExtensions, 115 switches::kDisableGLExtensions,
116 switches::kDisableLogging, 116 switches::kDisableLogging,
117 switches::kDisableSeccompFilterSandbox, 117 switches::kDisableSeccompFilterSandbox,
118 #if defined(ENABLE_WEBRTC) 118 #if defined(ENABLE_WEBRTC)
119 switches::kDisableWebRtcHWEncoding, 119 switches::kDisableWebRtcHWEncoding,
120 #endif 120 #endif
121 #if defined(OS_WIN) 121 #if defined(OS_WIN)
122 switches::kEnableAcceleratedVpxDecode, 122 switches::kEnableAcceleratedVpxDecode,
123 #endif 123 #endif
124 switches::kEnableHeapProfiling, 124 switches::kEnableHeapProfiling,
125 switches::kEnableLogging, 125 switches::kEnableLogging,
126 #if defined(OS_CHROMEOS) 126 #if defined(OS_CHROMEOS)
127 switches::kDisableVaapiAcceleratedVideoEncode, 127 switches::kDisableVaapiAcceleratedVideoEncode,
128 #endif 128 #endif
129 switches::kGpuDriverBugWorkarounds, 129 switches::kGpuDriverBugWorkarounds,
130 switches::kGpuStartupDialog, 130 switches::kGpuStartupDialog,
131 switches::kGpuSandboxAllowSysVShm, 131 switches::kGpuSandboxAllowSysVShm,
132 switches::kGpuSandboxFailuresFatal, 132 switches::kGpuSandboxFailuresFatal,
133 switches::kGpuSandboxStartEarly, 133 switches::kGpuSandboxStartEarly,
134 switches::kLoggingLevel, 134 switches::kLoggingLevel,
135 switches::kEnableLowEndDeviceMode, 135 switches::kEnableLowEndDeviceMode,
136 switches::kDisableLowEndDeviceMode, 136 switches::kDisableLowEndDeviceMode,
137 switches::kEnableMemoryBenchmarking, 137 switches::kEnableMemoryBenchmarking,
138 switches::kNoSandbox, 138 switches::kNoSandbox,
139 switches::kProfilerTiming, 139 switches::kProfilerTiming,
140 switches::kTestGLLib, 140 switches::kTestGLLib,
141 switches::kTraceConfigFile, 141 switches::kTraceConfigFile,
142 switches::kTraceStartup, 142 switches::kTraceStartup,
143 switches::kTraceToConsole, 143 switches::kTraceToConsole,
144 switches::kV, 144 switches::kUseGpuInTests,
145 switches::kVModule, 145 switches::kV,
146 switches::kVModule,
146 #if defined(OS_MACOSX) 147 #if defined(OS_MACOSX)
147 switches::kDisableRemoteCoreAnimation, 148 switches::kDisableRemoteCoreAnimation,
148 switches::kEnableSandboxLogging, 149 switches::kEnableSandboxLogging,
149 switches::kShowMacOverlayBorders, 150 switches::kShowMacOverlayBorders,
150 #endif 151 #endif
151 #if defined(USE_OZONE) 152 #if defined(USE_OZONE)
152 switches::kOzonePlatform, 153 switches::kOzonePlatform,
153 #endif 154 #endif
154 #if defined(USE_X11) && !defined(OS_CHROMEOS) 155 #if defined(USE_X11) && !defined(OS_CHROMEOS)
155 switches::kWindowDepth, 156 switches::kWindowDepth,
156 switches::kX11Display, 157 switches::kX11Display,
157 switches::kX11VisualID, 158 switches::kX11VisualID,
158 #endif 159 #endif
159 switches::kGpuTestingGLVendor, 160 switches::kGpuTestingGLVendor,
160 switches::kGpuTestingGLRenderer, 161 switches::kGpuTestingGLRenderer,
161 switches::kGpuTestingGLVersion, 162 switches::kGpuTestingGLVersion,
162 }; 163 };
163 164
164 enum GPUProcessLifetimeEvent { 165 enum GPUProcessLifetimeEvent {
165 LAUNCHED, 166 LAUNCHED,
166 DIED_FIRST_TIME, 167 DIED_FIRST_TIME,
167 DIED_SECOND_TIME, 168 DIED_SECOND_TIME,
168 DIED_THIRD_TIME, 169 DIED_THIRD_TIME,
169 DIED_FOURTH_TIME, 170 DIED_FOURTH_TIME,
170 GPU_PROCESS_LIFETIME_EVENT_MAX = 100 171 GPU_PROCESS_LIFETIME_EVENT_MAX = 100
171 }; 172 };
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1189 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1189 ClientIdToShaderCacheMap::iterator iter = 1190 ClientIdToShaderCacheMap::iterator iter =
1190 client_id_to_shader_cache_.find(client_id); 1191 client_id_to_shader_cache_.find(client_id);
1191 // If the cache doesn't exist then this is an off the record profile. 1192 // If the cache doesn't exist then this is an off the record profile.
1192 if (iter == client_id_to_shader_cache_.end()) 1193 if (iter == client_id_to_shader_cache_.end())
1193 return; 1194 return;
1194 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1195 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1195 } 1196 }
1196 1197
1197 } // namespace content 1198 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698