Bug 1299068 - part 4: on Android, send one frame to compositor at a time. draft
authorJohn Lin <jolin@mozilla.com>
Wed, 23 Nov 2016 15:14:28 +0800
changeset 447861 17bb9dc3a203950d914d95068813ee35a90fa719
parent 447860 dff4cf13734ea5018a02b77d3a030e9fe07f186d
child 447862 f2cd1015801d57169e263497eba10096d3fd6e8c
push id38198
push userbmo:jolin@mozilla.com
push dateThu, 08 Dec 2016 04:52:32 +0000
bugs1299068
milestone53.0a1
Bug 1299068 - part 4: on Android, send one frame to compositor at a time. MozReview-Commit-ID: IURBwIiv0q4
mobile/android/app/mobile.js
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -609,16 +609,20 @@ pref("media.cache_readahead_limit", 30);
 
 // Number of video frames we buffer while decoding video.
 // On Android this is decided by a similar value which varies for
 // each OMX decoder |OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountMin|. This
 // number must be less than the OMX equivalent or gecko will think it is
 // chronically starved of video frames. All decoders seen so far have a value
 // of at least 4.
 pref("media.video-queue.default-size", 3);
+// The maximum number of queued frames to send to the compositor.
+// On Android, it needs to be throttled because SurfaceTexture contains only one
+// (the most recent) image data.
+pref("media.video-queue.send-to-compositor-size", 1);
 
 #ifdef NIGHTLY_BUILD
 // Allow to check if the decoder supports recycling only on Fennec nightly build.
 pref("media.decoder.recycle.enabled", true);
 #endif
 
 // Enable the MediaCodec PlatformDecoderModule by default.
 pref("media.android-media-codec.enabled", true);