summaryrefslogtreecommitdiffstats
path: root/build/android
diff options
context:
space:
mode:
authoryolandyan <yolandyan@google.com>2016-01-27 19:22:28 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-28 03:24:15 +0000
commit5b685e2f6ec533187d6f93c6323ff90bd17c8a93 (patch)
tree1ff28b2f98a4e1e2662f441d555578a1e2c0dddb /build/android
parent5e83747bbbcc58343f84b57e71503d3392e90ac4 (diff)
downloadchromium_src-5b685e2f6ec533187d6f93c6323ff90bd17c8a93.zip
chromium_src-5b685e2f6ec533187d6f93c6323ff90bd17c8a93.tar.gz
chromium_src-5b685e2f6ec533187d6f93c6323ff90bd17c8a93.tar.bz2
Change gpu setting for emulator run with no ui
BUG= Review URL: https://codereview.chromium.org/1645823002 Cr-Commit-Position: refs/heads/master@{#371988}
Diffstat (limited to 'build/android')
-rw-r--r--build/android/pylib/utils/emulator.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/build/android/pylib/utils/emulator.py b/build/android/pylib/utils/emulator.py
index 4007f1a2..089fcb6 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',
])