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

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 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/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 df6b2594581ccab43d49fed0ec795a0ff3f0fc93..9f80e801e11f2a35a1e994ccc5fb16f36d9a90b2 100644
--- a/content/browser/media/android/browser_surface_view_manager.h
+++ b/content/browser/media/android/browser_surface_view_manager.h
@@ -37,6 +37,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. 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 SendDestroyingVideoSurface(int surface_id);
+
RenderFrameHost* const render_frame_host_;
// The surface id of the ContentVideoView surface.

Powered by Google App Engine
This is Rietveld 408576698