OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """ Run the Skia render_pictures executable. """ | 6 """ Run the Skia render_pictures executable. """ |
7 | 7 |
8 from build_step import BuildStep | 8 from build_step import BuildStep |
9 import os | 9 import os |
10 import sys | 10 import sys |
11 | 11 |
12 | 12 |
13 DEFAULT_TILE_X = 256 | 13 DEFAULT_TILE_X = 256 |
14 DEFAULT_TILE_Y = 256 | 14 DEFAULT_TILE_Y = 256 |
15 | 15 |
16 | 16 |
17 class RenderPictures(BuildStep): | 17 class RenderPictures(BuildStep): |
18 def DoRenderPictures(self, args, config='8888', write_images=True): | 18 def DoRenderPictures(self, args, config='8888', write_images=True): |
19 # For now, don't run on Android, since it takes too long and we don't use | 19 # For now, don't run on Android, since it takes too long and we don't use |
20 # the results. | 20 # the results. |
21 if hasattr(self, '_device'): | 21 if hasattr(self, '_device'): |
22 return | 22 return |
23 cmd = ['-r', self._device_dirs.SKPDir(), '--config', config, | 23 cmd = ['-r', self._device_dirs.SKPDir(), '--config', config, |
24 '--mode', 'tile', str(DEFAULT_TILE_X), str(DEFAULT_TILE_Y)] | 24 '--mode', 'tile', str(DEFAULT_TILE_X), str(DEFAULT_TILE_Y)] |
25 cmd.extend(args) | 25 cmd.extend(args) |
26 if self._builder_name == 'Skia_Shuttle_Ubuntu12_ATI5770_Float_Debug_64': | 26 if self._builder_name == 'Test-Ubuntu12-ShuttleA-ATI5770-x86_64-Debug': |
27 # For now, skip --validate and writing images on all builders except one. | 27 # For now, skip --validate and writing images on all builders except one. |
28 # Also skip --validate on Windows, where it is currently failing. | 28 # Also skip --validate on Windows, where it is currently failing. |
29 if write_images: | 29 if write_images: |
30 cmd.extend(['-w', self._device_dirs.SKPOutDir()]) | 30 cmd.extend(['-w', self._device_dirs.SKPOutDir()]) |
31 if not os.name == 'nt': | 31 if not os.name == 'nt': |
32 cmd.append('--validate') | 32 cmd.append('--validate') |
33 self.RunFlavoredCmd('render_pictures', cmd) | 33 self.RunFlavoredCmd('render_pictures', cmd) |
34 | 34 |
35 def _Run(self): | 35 def _Run(self): |
36 self.DoRenderPictures([]) | 36 self.DoRenderPictures([]) |
37 self.DoRenderPictures(['--bbh', 'grid', str(DEFAULT_TILE_X), | 37 self.DoRenderPictures(['--bbh', 'grid', str(DEFAULT_TILE_X), |
38 str(DEFAULT_TILE_X), '--clone', '1']) | 38 str(DEFAULT_TILE_X), '--clone', '1']) |
39 self.DoRenderPictures(['--bbh', 'rtree', '--clone', '2']) | 39 self.DoRenderPictures(['--bbh', 'rtree', '--clone', '2']) |
40 | 40 |
41 | 41 |
42 if '__main__' == __name__: | 42 if '__main__' == __name__: |
43 sys.exit(BuildStep.RunBuildStep(RenderPictures)) | 43 sys.exit(BuildStep.RunBuildStep(RenderPictures)) |
OLD | NEW |