Bug 1299068 - part 4: on Android, send one frame to compositor at a time. r=jya
authorJohn Lin <jolin@mozilla.com>
Wed, 23 Nov 2016 15:14:28 +0800
changeset 325370 f417fea060f73f7337f7d18c67630479524543e9
parent 325369 cd931b83e49951ad24f105762152d636941c075c
child 325371 8282bb09dc78e66b60ea2f1f905980bb15157788
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersjya
bugs1299068
milestone53.0a1
Bug 1299068 - part 4: on Android, send one frame to compositor at a time. r=jya 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);