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

Unified Diff: content/browser/gpu/gpu_process_host_ui_shim.h

Issue 712343003: Infrastructure for temportarily relinquishing GPU resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes suggested by dcheng Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host_ui_shim.h
diff --git a/content/browser/gpu/gpu_process_host_ui_shim.h b/content/browser/gpu/gpu_process_host_ui_shim.h
index e47dc9049f72d9c297e404a33aaa3c647a18015e..9d9ec533e28a536461d08952e346a4271ba2f995 100644
--- a/content/browser/gpu/gpu_process_host_ui_shim.h
+++ b/content/browser/gpu/gpu_process_host_ui_shim.h
@@ -12,7 +12,7 @@
#include <string>
-#include "base/callback_forward.h"
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
@@ -72,6 +72,7 @@ class GpuProcessHostUIShim : public IPC::Listener,
// actually received on the IO thread.
bool OnMessageReceived(const IPC::Message& message) override;
+ CONTENT_EXPORT void RelinquishGpuResources(const base::Closure& callback);
CONTENT_EXPORT void SimulateRemoveAllContext();
CONTENT_EXPORT void SimulateCrash();
CONTENT_EXPORT void SimulateHang();
@@ -93,9 +94,11 @@ class GpuProcessHostUIShim : public IPC::Listener,
const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params);
void OnVideoMemoryUsageStatsReceived(
const GPUVideoMemoryUsageStats& video_memory_usage_stats);
+ void OnResourcesRelinquished();
// The serial number of the GpuProcessHost / GpuProcessHostUIShim pair.
int host_id_;
+ base::Closure relinquish_callback_;
};
} // namespace content
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host_ui_shim.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698