OLD | NEW |
| (Empty) |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 | |
6 """ | |
7 This file defines the configurations in which bench_pictures should be run | |
8 on various platforms. The buildbots read these configurations from the | |
9 bench_pictures_cfg dictionary. Everything else in this file exists to help in | |
10 constructing that dictionary. | |
11 | |
12 This code is executed directly on the buildbot so that convenient things like | |
13 variables and loops can be used to avoid unnecessary verbosity. With great power | |
14 comes great responsibility; don't put any nasty code here. To reiterate, code in | |
15 this file will be directly executed on the build slaves. | |
16 """ | |
17 | |
18 | |
19 import os | |
20 import sys | |
21 | |
22 | |
23 if 'import_path' in globals(): | |
24 sys.path.append(import_path) | |
25 | |
26 | |
27 from bench_pictures_cfg_helper import * | |
28 | |
29 | |
30 # Default tile sizes | |
31 DEFAULT_TILE_X = '256' | |
32 DEFAULT_TILE_Y = '256' | |
33 | |
34 # Default viewport size | |
35 DEFAULT_VIEWPORT_X = 1000 | |
36 DEFAULT_VIEWPORT_Y = 1000 | |
37 | |
38 # Default scale factor for scaled configs. | |
39 DEFAULT_SCALE = 1.1 | |
40 | |
41 # Configs to run on most bots | |
42 default_configs = [ | |
43 # Viewport CPU and GPU | |
44 ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y), | |
45 ViewportGPUConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y), | |
46 | |
47 # Scaled viewport, CPU and GPU | |
48 ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y, | |
49 scale=str(DEFAULT_SCALE)), | |
50 ViewportGPUConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y, | |
51 scale=str(DEFAULT_SCALE)), | |
52 ] | |
53 | |
54 default_no_gpu = [cfg for cfg in default_configs if cfg['config'] != 'gpu'] | |
55 | |
56 | |
57 msaa4 = Config(config='msaa4', viewport=[str(DEFAULT_VIEWPORT_X), | |
58 str(DEFAULT_VIEWPORT_Y)]) | |
59 | |
60 msaa16 = Config(config='msaa16', viewport=[str(DEFAULT_VIEWPORT_X), | |
61 str(DEFAULT_VIEWPORT_Y)]) | |
62 | |
63 viewport_angle = Config(config='angle', viewport=[str(DEFAULT_VIEWPORT_X), | |
64 str(DEFAULT_VIEWPORT_Y)]) | |
65 | |
66 # This dictionary defines the sets of configs for all platforms. Each config is | |
67 # a dictionary of key/value pairs directly corresponding to the command-line | |
68 # flags passed to bench_pictures. | |
69 bench_pictures_cfg = { | |
70 'angle': [viewport_angle], | |
71 'debug': [ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y)], | |
72 'default': default_configs, | |
73 'no_gpu': default_no_gpu, | |
74 'nexus_s': default_no_gpu, | |
75 'xoom': default_configs, | |
76 'galaxy_nexus': default_configs, | |
77 'nexus_4': default_configs + [msaa4], | |
78 'nexus_7': default_configs, | |
79 'nexus_10': default_configs + [msaa4], | |
80 'razr_i': default_configs + [msaa4], | |
81 'intel_rhb': default_no_gpu, | |
82 'default_msaa16': default_configs + [msaa16], | |
83 } | |
OLD | NEW |