perf: Enable adb-lite by default

This commit is contained in:
Hao Guan
2023-01-14 17:42:51 +10:00
parent a246031a8e
commit c81d7cea6e
2 changed files with 2 additions and 3 deletions

View File

@@ -561,8 +561,7 @@ bool asst::Controller::screencap(bool allow_reconnect)
auto start_time = high_resolution_clock::now();
if (m_support_socket && m_server_started &&
screencap(m_adb.screencap_raw_by_nc, decode_raw, allow_reconnect, true)) {
// sock 第一次截图比较长(不知道是不是初始化了什么东西耽误时间,减个额外的的时间)
auto duration = duration_cast<milliseconds>(high_resolution_clock::now() - start_time) - 100ms;
auto duration = duration_cast<milliseconds>(high_resolution_clock::now() - start_time);
if (duration < min_cost) {
m_adb.screencap_method = AdbProperty::ScreencapMethod::RawByNc;
make_instance_inited(true);

View File

@@ -133,7 +133,7 @@ namespace asst
std::mutex m_callcmd_mutex;
// adb-lite properties
bool m_use_adb_lite = false;
bool m_use_adb_lite = true;
std::shared_ptr<adb::client> m_adb_client = nullptr;
std::shared_ptr<adb::io_handle> m_minitouch_handle = nullptr;