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

Unified Diff: content/gpu/gpu_child_thread.cc

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
« content/common/gpu_host_messages.h ('K') | « content/gpu/gpu_child_thread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_child_thread.cc
diff --git a/content/gpu/gpu_child_thread.cc b/content/gpu/gpu_child_thread.cc
index e652ca914b2522242abeff12133648870ae82245..e482dd9dc69a0a06d46730888223976e69767b6e 100644
--- a/content/gpu/gpu_child_thread.cc
+++ b/content/gpu/gpu_child_thread.cc
@@ -48,6 +48,10 @@
#include "gpu/vulkan/vulkan_surface.h"
#endif
+#if defined(OS_ANDROID)
+#include "content/common/gpu/media/avda_surface_tracker.h"
+#endif
+
namespace content {
namespace {
@@ -294,6 +298,8 @@ bool GpuChildThread::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(GpuMsg_UpdateValueState, OnUpdateValueState)
#if defined(OS_ANDROID)
IPC_MESSAGE_HANDLER(GpuMsg_WakeUpGpu, OnWakeUpGpu);
+ IPC_MESSAGE_HANDLER(GpuMsg_DestroyingVideoSurface,
+ OnDestroyingVideoSurface);
#endif
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -577,6 +583,11 @@ void GpuChildThread::OnWakeUpGpu() {
if (gpu_channel_manager_)
gpu_channel_manager_->WakeUpGpu();
}
+
+void GpuChildThread::OnDestroyingVideoSurface(int surface_id) {
+ AVDASurfaceTracker::GetInstance()->NotifyDestroyingSurface(surface_id);
+ Send(new GpuHostMsg_DestroyingVideoSurfaceHandled(surface_id));
+}
#endif
void GpuChildThread::OnLoseAllContexts() {
« content/common/gpu_host_messages.h ('K') | « content/gpu/gpu_child_thread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698