OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import default_flavor | 5 import default_flavor |
6 import subprocess | 6 import subprocess |
7 | 7 |
8 # Data should go under in _data_dir, which may be preserved across runs. | 8 # Data should go under in _data_dir, which may be preserved across runs. |
9 _data_dir = '/sdcard/revenge_of_the_skiabot/' | 9 _data_dir = '/sdcard/revenge_of_the_skiabot/' |
10 # Executables go under _bin_dir, which, well, allows executable files. | 10 # Executables go under _bin_dir, which, well, allows executable files. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 quote = lambda x: '"%s"' % x | 56 quote = lambda x: '"%s"' % x |
57 args = { | 57 args = { |
58 'ndk': quote(self.m.vars.slave_dir.join(ndk_asset)), | 58 'ndk': quote(self.m.vars.slave_dir.join(ndk_asset)), |
59 'target_cpu': quote(target_arch), | 59 'target_cpu': quote(target_arch), |
60 } | 60 } |
61 | 61 |
62 if configuration != 'Debug': | 62 if configuration != 'Debug': |
63 args['is_debug'] = 'false' | 63 args['is_debug'] = 'false' |
64 if 'Vulkan' in extra_config: | 64 if 'Vulkan' in extra_config: |
65 args['skia_use_vulkan'] = 'true' | |
66 args['ndk_api'] = 24 | 65 args['ndk_api'] = 24 |
67 | 66 |
68 gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems())) | 67 gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems())) |
69 | 68 |
70 self._run('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn'), | 69 self._run('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn'), |
71 infra_step=True) | 70 infra_step=True) |
72 self._run('gn gen', 'gn', 'gen', self.out_dir, '--args=' + gn_args) | 71 self._run('gn gen', 'gn', 'gen', self.out_dir, '--args=' + gn_args) |
73 self._run('ninja', 'ninja', '-C', self.out_dir) | 72 self._run('ninja', 'ninja', '-C', self.out_dir) |
74 | 73 |
75 def install(self): | 74 def install(self): |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 def read_file_on_device(self, path): | 136 def read_file_on_device(self, path): |
138 return self._adb('read %s' % path, | 137 return self._adb('read %s' % path, |
139 'shell', 'cat', path, stdout=self.m.raw_io.output()).stdout | 138 'shell', 'cat', path, stdout=self.m.raw_io.output()).stdout |
140 | 139 |
141 def remove_file_on_device(self, path): | 140 def remove_file_on_device(self, path): |
142 self._adb('rm %s' % path, 'shell', 'rm', '-f', path) | 141 self._adb('rm %s' % path, 'shell', 'rm', '-f', path) |
143 | 142 |
144 def create_clean_device_dir(self, path): | 143 def create_clean_device_dir(self, path): |
145 self._adb('rm %s' % path, 'shell', 'rm', '-rf', path) | 144 self._adb('rm %s' % path, 'shell', 'rm', '-rf', path) |
146 self._adb('mkdir %s' % path, 'shell', 'mkdir', '-p', path) | 145 self._adb('mkdir %s' % path, 'shell', 'mkdir', '-p', path) |
OLD | NEW |