Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(787)

Unified Diff: build/android/pylib/utils/emulator.py

Issue 1645823002: Change gpu setting for emulator run with no ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/emulator.py
diff --git a/build/android/pylib/utils/emulator.py b/build/android/pylib/utils/emulator.py
index 4007f1a2d3059553a65200be31e5ff276d6d8470..089fcb6f232521ef63fa5319543056dcd03e45e0 100644
--- a/build/android/pylib/utils/emulator.py
+++ b/build/android/pylib/utils/emulator.py
@@ -39,7 +39,7 @@ hw.cpu.arch={hw.cpu.arch}
hw.device.hash=-708107041
hw.camera.back=none
disk.dataPartition.size=800M
-hw.gpu.enabled=yes
+hw.gpu.enabled={gpu}
skin.path=720x1280
skin.dynamic=yes
hw.keyboard=yes
@@ -331,6 +331,7 @@ class Emulator(object):
custom_config = custom_config.replace(key, replacements[key])
custom_config = custom_config.replace('{api.level}', str(api_level))
custom_config = custom_config.replace('{sdcard.size}', self.sdcard_size)
+ custom_config.replace('{gpu}', 'no' if self.headless else 'yes')
with open(new_config_ini, 'w') as new_config_ini:
new_config_ini.write(custom_config)
@@ -388,12 +389,14 @@ class Emulator(object):
'-no-audio',
'-no-window'
])
+ else:
+ emulator_command.extend([
+ '-gpu', 'on'
+ ])
emulator_command.extend([
# Use a familiar name and port.
'-avd', self.avd_name,
'-port', str(port),
- # Enable GPU by default.
- '-gpu', 'on',
# all the argument after qemu are sub arguments for qemu
'-qemu', '-m', '1024',
])
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698