| Index: content/browser/gpu/gpu_process_host.h
|
| diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
|
| index 2952d3869effc927437dad452f2b05e214952caa..03dfb1afdbabd21ed6f95836c69db6277c174d6b 100644
|
| --- a/content/browser/gpu/gpu_process_host.h
|
| +++ b/content/browser/gpu/gpu_process_host.h
|
| @@ -64,6 +64,8 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
| typedef base::Callback<void(const gfx::GpuMemoryBufferHandle& handle)>
|
| CreateGpuMemoryBufferCallback;
|
|
|
| + typedef base::Callback<void(bool successful)> RelinquishCallback;
|
| +
|
| static bool gpu_enabled() { return gpu_enabled_; }
|
| static int gpu_crash_count() { return gpu_crash_count_; }
|
|
|
| @@ -89,6 +91,10 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
| CONTENT_EXPORT static void RegisterGpuMainThreadFactory(
|
| GpuMainThreadFactoryFunction create);
|
|
|
| + // Relinquish all internal GPU driver resources. All windows should be closed
|
| + // and the browser is being set to be placed in the bacckground.
|
| + static void RelinquishResources(const RelinquishCallback& callback);
|
| +
|
| // Get the GPU process host for the GPU process with the given ID. Returns
|
| // null if the process no longer exists.
|
| static GpuProcessHost* FromID(int host_id);
|
| @@ -176,6 +182,8 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
| #if defined(OS_MACOSX)
|
| void OnAcceleratedSurfaceBuffersSwapped(const IPC::Message& message);
|
| #endif
|
| + void RelinquishResourcesInternal(const RelinquishCallback& callback);
|
| + void OnResourcesRelinquished(bool success);
|
|
|
| void CreateChannelCache(int32 client_id);
|
| void OnDestroyChannel(int32 client_id);
|
| @@ -230,6 +238,9 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
|
| // Time Init started. Used to log total GPU process startup time to UMA.
|
| base::TimeTicks init_start_time_;
|
|
|
| + // Completion callback for RelinquishResources.
|
| + RelinquishCallback relinquish_callback_;
|
| +
|
| // Whether this host recorded a GPU crash or not.
|
| bool gpu_crash_recorded_;
|
|
|
|
|