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

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

Issue 1878103002: Plumb a Browser->GPU surface destruction message for Android VDAs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing ifdefs Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
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 1d8053bd180c566409fc45980411edae23e77d64..636cbecb0d4fc96b95099e53968a1a632362e02e 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -153,6 +153,12 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
int client_id,
const gpu::SyncToken& sync_token);
+#if defined(OS_ANDROID)
+ // Tells the GPU process that the given surface is being destroyed so that it
+ // can stop using it.
+ void DestroyingVideoSurface(int surface_id, const base::Closure& done_cb);
+#endif
+
// What kind of GPU process, e.g. sandboxed or unsandboxed.
GpuProcessKind kind();
@@ -189,6 +195,9 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
void OnInitialized(bool result, const gpu::GPUInfo& gpu_info);
void OnChannelEstablished(const IPC::ChannelHandle& channel_handle);
void OnGpuMemoryBufferCreated(const gfx::GpuMemoryBufferHandle& handle);
+#if defined(OS_ANDROID)
+ void OnDestroyingVideoSurfaceHandled(int surface_id);
+#endif
void OnDidCreateOffscreenContext(const GURL& url);
void OnDidLoseContext(bool offscreen,
gpu::error::ContextLostReason reason,
@@ -232,6 +241,9 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
// The pending create gpu memory buffer requests we need to reply to.
std::queue<CreateGpuMemoryBufferCallback> create_gpu_memory_buffer_requests_;
+ // A callback to signal the completion of DestroyingVideoSurface call.
+ base::Closure destroying_video_surface_request_;
+
// Qeueud messages to send when the process launches.
std::queue<IPC::Message*> queued_messages_;

Powered by Google App Engine
This is Rietveld 408576698