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

Unified Diff: content/browser/media/android/browser_surface_view_manager.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 a threadchecker 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/media/android/browser_surface_view_manager.h
diff --git a/content/browser/media/android/browser_surface_view_manager.h b/content/browser/media/android/browser_surface_view_manager.h
index 2bff709c034d5e73dfe86d240ef7ca12d9bb605d..fbfeab45b6809784dbe6377d313d509c7a33f589 100644
--- a/content/browser/media/android/browser_surface_view_manager.h
+++ b/content/browser/media/android/browser_surface_view_manager.h
@@ -38,6 +38,14 @@ class CONTENT_EXPORT BrowserSurfaceViewManager
// Send a message to return the surface id to the caller.
bool SendSurfaceID(int surface_id);
+ // Synchronously notify the decoder that the surface is being destroyed so it
+ // can stop rendering to it. This sends a message to the GPU process. Without
+ // this, the MediaCodec decoder will start throwing IllegalStateException, and
+ // crash on some devices (http://crbug.com/598408). There is no way for us to
+ // make sure the surface outlives the decoder because Android initiates the
+ // destruction in some cases.
+ void SendDestroyingVideoSurfaceIfRequired(int surface_id);
+
RenderFrameHost* const render_frame_host_;
// The surface id of the ContentVideoView surface.
« no previous file with comments | « content/browser/gpu/gpu_process_host.cc ('k') | content/browser/media/android/browser_surface_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698