Bug 1256626: P1. Add NotifyBenchmarkResult ipc methods. r=jimm

This will be used to save video benchmark results. For now only VP9 is handled.

MozReview-Commit-ID: 4aIWQKoGWVQ

--HG--
extra : rebase_source : 72272b507078f30f1d231c1d4756b2ff67c176cc
This commit is contained in:
Jean-Yves Avenard 2016-03-17 17:18:35 +11:00
Родитель 830e36b012
Коммит eb4618bded
3 изменённых файлов: 24 добавлений и 0 удалений

Просмотреть файл

@ -269,6 +269,9 @@ using namespace mozilla::system;
#include "VRManagerParent.h" // for VRManagerParent
// For VP9Benchmark::sBenchmarkFpsPref
#include "Benchmark.h"
static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID);
#if defined(XP_WIN)
@ -5711,6 +5714,17 @@ ContentParent::RecvGetAndroidSystemInfo(AndroidSystemInfo* aInfo)
#endif
}
bool
ContentParent::RecvNotifyBenchmarkResult(const nsString& aCodecName,
const uint32_t& aDecodeFPS)
{
if (aCodecName.EqualsLiteral("VP9")) {
Preferences::SetUint(VP9Benchmark::sBenchmarkFpsPref, aDecodeFPS);
}
return true;
}
void
ContentParent::StartProfiler(nsIProfilerStartParams* aParams)
{

Просмотреть файл

@ -1092,6 +1092,9 @@ private:
virtual bool RecvGetAndroidSystemInfo(AndroidSystemInfo* aInfo) override;
virtual bool RecvNotifyBenchmarkResult(const nsString& aCodecName,
const uint32_t& aDecodeFPS) override;
// If you add strong pointers to cycle collected objects here, be sure to
// release these objects in ShutDownProcess. See the comment there for more
// details.

Просмотреть файл

@ -1197,6 +1197,13 @@ parent:
sync UngrabPointer(uint32_t time);
sync RemovePermission(Principal principal, nsCString permissionType) returns (nsresult rv);
/**
* Tell the parent that a decoder's' benchmark has been completed.
* The result can then be stored in permanent storage.
*/
async NotifyBenchmarkResult(nsString aCodecName, uint32_t aDecodeFPS);
both:
async AsyncMessage(nsString aMessage, ClonedMessageData aData,
CpowEntry[] aCpows, Principal aPrincipal);