Bug 1319987: P11. Fix MediaDataDecoder gtest. r?gerald
They appear to have been broken for a while. Several months at least.
MozReview-Commit-ID: I71xE91UMOZ
--- a/dom/media/Benchmark.cpp
+++ b/dom/media/Benchmark.cpp
@@ -5,20 +5,22 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "Benchmark.h"
#include "BufferMediaResource.h"
#include "MediaData.h"
#include "MediaPrefs.h"
#include "PDMFactory.h"
#include "WebMDemuxer.h"
+#include "gfxPrefs.h"
#include "mozilla/AbstractThread.h"
#include "mozilla/Preferences.h"
#include "mozilla/Telemetry.h"
#include "mozilla/dom/ContentChild.h"
+#include "mozilla/gfx/gfxVars.h"
#ifndef MOZ_WIDGET_ANDROID
#include "WebMSample.h"
#endif
namespace mozilla {
// Update this version number to force re-running the benchmark. Such as when
@@ -131,17 +133,18 @@ Benchmark::Dispose()
mKeepAliveUntilComplete = nullptr;
mPromise.RejectIfExists(false, __func__);
}
void
Benchmark::Init()
{
MOZ_ASSERT(NS_IsMainThread());
-
+ gfxVars::Initialize();
+ gfxPrefs::GetSingleton();
MediaPrefs::GetSingleton();
}
BenchmarkPlayback::BenchmarkPlayback(Benchmark* aMainThreadState,
MediaDataDemuxer* aDemuxer)
: QueueObject(new TaskQueue(GetMediaThreadPool(MediaThreadType::PLAYBACK)))
, mMainThreadState(aMainThreadState)
, mDecoderTaskQueue(new TaskQueue(GetMediaThreadPool(