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 if 'FrameworkDefs' in extra_config: |
| 67 args['skia_enable_android_framework_defines'] = 'true' |
66 | 68 |
67 gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems())) | 69 gn_args = ' '.join('%s=%s' % (k,v) for (k,v) in sorted(args.iteritems())) |
68 | 70 |
69 self._run('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn'), | 71 self._run('fetch-gn', self.m.vars.skia_dir.join('bin', 'fetch-gn'), |
70 infra_step=True) | 72 infra_step=True) |
71 self._run('gn gen', 'gn', 'gen', self.out_dir, '--args=' + gn_args) | 73 self._run('gn gen', 'gn', 'gen', self.out_dir, '--args=' + gn_args) |
72 self._run('ninja', 'ninja', '-C', self.out_dir) | 74 self._run('ninja', 'ninja', '-C', self.out_dir) |
73 | 75 |
74 def install(self): | 76 def install(self): |
75 self._adb('mkdir ' + self.device_dirs.resource_dir, | 77 self._adb('mkdir ' + self.device_dirs.resource_dir, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 def read_file_on_device(self, path): | 138 def read_file_on_device(self, path): |
137 return self._adb('read %s' % path, | 139 return self._adb('read %s' % path, |
138 'shell', 'cat', path, stdout=self.m.raw_io.output()).stdout | 140 'shell', 'cat', path, stdout=self.m.raw_io.output()).stdout |
139 | 141 |
140 def remove_file_on_device(self, path): | 142 def remove_file_on_device(self, path): |
141 self._adb('rm %s' % path, 'shell', 'rm', '-f', path) | 143 self._adb('rm %s' % path, 'shell', 'rm', '-f', path) |
142 | 144 |
143 def create_clean_device_dir(self, path): | 145 def create_clean_device_dir(self, path): |
144 self._adb('rm %s' % path, 'shell', 'rm', '-rf', path) | 146 self._adb('rm %s' % path, 'shell', 'rm', '-rf', path) |
145 self._adb('mkdir %s' % path, 'shell', 'mkdir', '-p', path) | 147 self._adb('mkdir %s' % path, 'shell', 'mkdir', '-p', path) |
OLD | NEW |