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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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['ndk_api'] = 24 | 65 args['ndk_api'] = 24 |
| 66 args['skia_enable_vulkan_debug_layers'] = 'false' |
66 if 'FrameworkDefs' in extra_config: | 67 if 'FrameworkDefs' in extra_config: |
67 args['skia_enable_android_framework_defines'] = 'true' | 68 args['skia_enable_android_framework_defines'] = 'true' |
68 | 69 |
69 gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems())) | 70 gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems())) |
70 | 71 |
71 self._run('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn'), | 72 self._run('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn'), |
72 infra_step=True) | 73 infra_step=True) |
73 self._run('gn gen', 'gn', 'gen', self.out_dir, '--args=' + gn_args) | 74 self._run('gn gen', 'gn', 'gen', self.out_dir, '--args=' + gn_args) |
74 self._run('ninja', 'ninja', '-C', self.out_dir) | 75 self._run('ninja', 'ninja', '-C', self.out_dir) |
75 | 76 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 def read_file_on_device(self, path): | 156 def read_file_on_device(self, path): |
156 return self._adb('read %s' % path, | 157 return self._adb('read %s' % path, |
157 'shell', 'cat', path, stdout=self.m.raw_io.output()).stdout | 158 'shell', 'cat', path, stdout=self.m.raw_io.output()).stdout |
158 | 159 |
159 def remove_file_on_device(self, path): | 160 def remove_file_on_device(self, path): |
160 self._adb('rm %s' % path, 'shell', 'rm', '-f', path) | 161 self._adb('rm %s' % path, 'shell', 'rm', '-f', path) |
161 | 162 |
162 def create_clean_device_dir(self, path): | 163 def create_clean_device_dir(self, path): |
163 self._adb('rm %s' % path, 'shell', 'rm', '-rf', path) | 164 self._adb('rm %s' % path, 'shell', 'rm', '-rf', path) |
164 self._adb('mkdir %s' % path, 'shell', 'mkdir', '-p', path) | 165 self._adb('mkdir %s' % path, 'shell', 'mkdir', '-p', path) |
OLD | NEW |