Add: Use ldopengl if available

This commit is contained in:
LmeSzinc 2024-09-27 12:31:00 +08:00
parent b0da726cbf
commit a5c9724ef3
2 changed files with 8 additions and 0 deletions

View File

@ -192,6 +192,8 @@ class Benchmark(DaemonBase):
click = ['ADB', 'Hermit', 'MaaTouch'] click = ['ADB', 'Hermit', 'MaaTouch']
if self.device.nemu_ipc_available(): if self.device.nemu_ipc_available():
screenshot.append('nemu_ipc') screenshot.append('nemu_ipc')
if self.device.ldopengl_available():
screenshot.append('ldopengl')
scene = self.config.Benchmark_TestScene scene = self.config.Benchmark_TestScene
if 'screenshot' not in scene: if 'screenshot' not in scene:
@ -232,6 +234,8 @@ class Benchmark(DaemonBase):
screenshot = remove('ADB_nc', 'aScreenCap_nc') screenshot = remove('ADB_nc', 'aScreenCap_nc')
if self.device.nemu_ipc_available(): if self.device.nemu_ipc_available():
screenshot.append('nemu_ipc') screenshot.append('nemu_ipc')
if self.device.ldopengl_available():
screenshot.append('ldopengl')
screenshot = tuple(screenshot) screenshot = tuple(screenshot)
self.TEST_TOTAL = 3 self.TEST_TOTAL = 3

View File

@ -51,6 +51,10 @@ class Screenshot(Adb, WSA, DroidCast, AScreenCap, Scrcpy, NemuIpc, LDOpenGL):
logger.attr('nemu_ipc_available', available) logger.attr('nemu_ipc_available', available)
if available: if available:
return 'nemu_ipc' return 'nemu_ipc'
available = self.ldopengl_available()
logger.attr('ldopengl_available', available)
if available:
return 'ldopengl'
return '' return ''
def screenshot(self): def screenshot(self):