diff options
Diffstat (limited to 'chromium/content/browser/gpu/gpu_process_host.h')
-rw-r--r-- | chromium/content/browser/gpu/gpu_process_host.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/chromium/content/browser/gpu/gpu_process_host.h b/chromium/content/browser/gpu/gpu_process_host.h index ced7049a1d2..51b57b61eb4 100644 --- a/chromium/content/browser/gpu/gpu_process_host.h +++ b/chromium/content/browser/gpu/gpu_process_host.h @@ -80,8 +80,8 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate, SUCCESS, }; using CreateGpuMemoryBufferCallback = - base::Callback<void(const gfx::GpuMemoryBufferHandle& handle, - BufferCreationStatus status)>; + base::OnceCallback<void(const gfx::GpuMemoryBufferHandle& handle, + BufferCreationStatus status)>; using RequestGPUInfoCallback = base::Callback<void(const gpu::GPUInfo&)>; using RequestHDRStatusCallback = base::Callback<void(bool)>; @@ -138,7 +138,7 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate, gfx::BufferUsage usage, int client_id, gpu::SurfaceHandle surface_handle, - const CreateGpuMemoryBufferCallback& callback); + CreateGpuMemoryBufferCallback callback); // Tells the GPU process to destroy GPU memory buffer. void DestroyGpuMemoryBuffer(gfx::GpuMemoryBufferId id, @@ -150,8 +150,7 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate, // browser must submit CompositorFrames over IPC. void ConnectFrameSinkManager( viz::mojom::FrameSinkManagerRequest request, - viz::mojom::FrameSinkManagerClientPtrInfo client, - viz::mojom::CompositingModeWatcherPtrInfo mode_watcher); + viz::mojom::FrameSinkManagerClientPtrInfo client); void RequestGPUInfo(RequestGPUInfoCallback request_cb); void RequestHDRStatus(RequestHDRStatusCallback request_cb); @@ -183,6 +182,10 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate, static bool ValidateHost(GpuProcessHost* host); + // Increments the given crash count. Also, for each hour passed since the + // previous crash, removes an old crash from the count. + static void IncrementCrashCount(int* crash_count); + GpuProcessHost(int host_id, GpuProcessKind kind); ~GpuProcessHost() override; @@ -270,7 +273,6 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate, // of a separate GPU process. bool in_process_; - bool swiftshader_rendering_; GpuProcessKind kind_; // Whether we actually launched a GPU process. @@ -281,16 +283,13 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate, // Time Init started. Used to log total GPU process startup time to UMA. base::TimeTicks init_start_time_; - // Master switch for enabling/disabling GPU acceleration for the current - // browser session. - static bool gpu_enabled_; - - static bool hardware_gpu_enabled_; - static base::subtle::Atomic32 gpu_crash_count_; static int gpu_recent_crash_count_; static bool crashed_before_; static int swiftshader_crash_count_; + static int swiftshader_recent_crash_count_; + static int display_compositor_crash_count_; + static int display_compositor_recent_crash_count_; // Here the bottom-up destruction order matters: // The GPU thread depends on its host so stop the host last. |