Commit adf9b13f authored by Jean-Yves Avenard's avatar Jean-Yves Avenard
Browse files

Bug 1230641: P2. Increase the video queue size on mac. r=cpearce

The mac decoder when used on intel GPU gives bad performance due to locking. Increasing the queue size allows to alleviate most problems.

MozReview-Commit-ID: 3yQ3btiMqvk

--HG--
extra : rebase_source : 17951db2769b2cd56742ba420f08b3f5ebc2436d
parent 7b7d6698
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -175,10 +175,15 @@ static int64_t DurationToUsecs(TimeDuration aDuration) {

static const uint32_t MIN_VIDEO_QUEUE_SIZE = 3;
static const uint32_t MAX_VIDEO_QUEUE_SIZE = 10;
#ifdef MOZ_APPLEMEDIA
static const uint32_t HW_VIDEO_QUEUE_SIZE = 10;
#else
static const uint32_t HW_VIDEO_QUEUE_SIZE = 3;
#endif
static const uint32_t VIDEO_QUEUE_SEND_TO_COMPOSITOR_SIZE = 9999;

static uint32_t sVideoQueueDefaultSize = MAX_VIDEO_QUEUE_SIZE;
static uint32_t sVideoQueueHWAccelSize = MIN_VIDEO_QUEUE_SIZE;
static uint32_t sVideoQueueHWAccelSize = HW_VIDEO_QUEUE_SIZE;
static uint32_t sVideoQueueSendToCompositorSize = VIDEO_QUEUE_SEND_TO_COMPOSITOR_SIZE;

static void InitVideoQueuePrefs() {
@@ -189,7 +194,7 @@ static void InitVideoQueuePrefs() {
    sVideoQueueDefaultSize = Preferences::GetUint(
      "media.video-queue.default-size", MAX_VIDEO_QUEUE_SIZE);
    sVideoQueueHWAccelSize = Preferences::GetUint(
      "media.video-queue.hw-accel-size", MIN_VIDEO_QUEUE_SIZE);
      "media.video-queue.hw-accel-size", HW_VIDEO_QUEUE_SIZE);
    sVideoQueueSendToCompositorSize = Preferences::GetUint(
      "media.video-queue.send-to-compositor-size", VIDEO_QUEUE_SEND_TO_COMPOSITOR_SIZE);
  }