Bug 1320101 - Pass mLastFramerateTenths by copy. r=jesup

Just for the cleanliness of not having to pass an atomic that we always read
by reference.

MozReview-Commit-ID: 60HzuTAENdQ

--HG--
extra : rebase_source : 999b0847139107b16eb2daaf24e6195bd3ebcd7e
This commit is contained in:
Andreas Pehrson 2016-11-26 00:28:29 +01:00
parent ccf57b4de1
commit 54dd33be82
2 changed files with 3 additions and 3 deletions

View File

@ -1133,7 +1133,7 @@ void
WebrtcVideoConduit::SelectBitrates(unsigned short width,
unsigned short height,
unsigned int cap,
mozilla::Atomic<int32_t, mozilla::Relaxed>& aLastFramerateTenths,
int32_t aLastFramerateTenths,
unsigned int& out_min,
unsigned int& out_start,
unsigned int& out_max)
@ -1155,7 +1155,7 @@ WebrtcVideoConduit::SelectBitrates(unsigned short width,
}
}
// mLastFramerateTenths is an atomic, and scaled by *10
// mLastFramerateTenths is scaled by *10
double framerate = std::min((aLastFramerateTenths/10.),60.0);
MOZ_ASSERT(framerate > 0);
// Now linear reduction/increase based on fps (max 60fps i.e. doubling)

View File

@ -147,7 +147,7 @@ public:
void SelectBitrates(unsigned short width,
unsigned short height,
unsigned int cap,
mozilla::Atomic<int32_t, mozilla::Relaxed>& aLastFramerateTenths,
int32_t aLastFramerateTenths,
unsigned int& out_min,
unsigned int& out_start,
unsigned int& out_max);