"Enabled");
if (enable_game_mode) {
- if (IsLiteMemoryBoard())
- WRT_thread_booster::GetInstance()->BoostUpAllThreads(60000);
-
auto current_command_line = base::CommandLine::ForCurrentProcess();
current_command_line->AppendSwitch(switches::kEnableGameMode);
base::FieldTrialList::CreateFieldTrial("WebRTC-ForceZeroDelayInGameMode",
boost_request_by_process_name(name.c_str(), (const boost_info_t*)&info);
}
-void WRT_thread_booster::BoostUpAllThreads(int msec) {
- boost_generic_info_t info;
- info.parent.framework_type = BOOST_GENERIC;
- info.event = BOOST_GENERIC_EVENT_USER_REQUEST_START;
- info.group = BOOST_CGROUP_NORMAL;
- info.sched = BOOST_API_SCHED_RR;
- info.boostingTimeMs = msec;
- LOG(INFO) << "boost up all threads timeout [" << msec << "] ms";
- boost_request_by_pid(current_pid, (const boost_info_t*)&info);
-}
-
#else
WRT_thread_booster::WRT_thread_booster() {}
void WRT_thread_booster::RegisterThreadByName(std::string name) {}
int msec) {}
void WRT_thread_booster::BoostUpByProNameTimeout(const std::string& name,
int msec) {}
-void WRT_thread_booster::BoostUpAllThreads(int msec) {}
-
#endif
} // namespace wrt
void BoostUpByThreadNameTimeout(std::string name, int msec);
void BoostUpByProNameTimeout(const std::string& name, int msec);
- void BoostUpAllThreads(int msec);
-
WRT_thread_booster();
~WRT_thread_booster() = default;