blob: ab049e3163e0a02306bc0379ce7c1eb53623df3a [file] [log] [blame]
borenet@google.com1558d682012-12-12 20:13:26 +00001# 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"""
7This file defines the configurations in which bench_pictures should be run
8on various platforms. The buildbots read these configurations from the
9bench_pictures_cfg dictionary. Everything else in this file exists to help in
10constructing that dictionary.
11
12This code is executed directly on the buildbot so that convenient things like
13variables and loops can be used to avoid unnecessary verbosity. With great power
14comes great responsibility; don't put any nasty code here. To reiterate, code in
15this file will be directly executed on the build slaves.
16"""
17
18
19import os
20import sys
21
22
23if 'import_path' in globals():
24 sys.path.append(import_path)
25
26
27from bench_pictures_cfg_helper import *
28
29
30# Default tile sizes
31DEFAULT_TILE_X = '256'
32DEFAULT_TILE_Y = '256'
33
borenet@google.comaa84ac32013-09-09 15:13:25 +000034# Default viewport size
borenet@google.com40fbcae2013-12-20 14:48:38 +000035DEFAULT_VIEWPORT_X = 1000
borenet@google.comaa84ac32013-09-09 15:13:25 +000036DEFAULT_VIEWPORT_Y = 1000
37
borenet@google.com40fbcae2013-12-20 14:48:38 +000038# Default scale factor for scaled configs.
39DEFAULT_SCALE = 1.1
borenet@google.com1558d682012-12-12 20:13:26 +000040
41# Configs to run on most bots
42default_configs = [
borenet@google.comaa84ac32013-09-09 15:13:25 +000043 # Viewport CPU and GPU
borenet@google.coma5ed2ae2013-09-09 15:24:40 +000044 ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y),
45 ViewportGPUConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y),
borenet@google.com1558d682012-12-12 20:13:26 +000046
borenet@google.com40fbcae2013-12-20 14:48:38 +000047 # 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)),
borenet@google.com1558d682012-12-12 20:13:26 +000052]
53
borenet@google.com40fbcae2013-12-20 14:48:38 +000054default_no_gpu = [cfg for cfg in default_configs if cfg['config'] != 'gpu']
borenet@google.com1558d682012-12-12 20:13:26 +000055
56
borenet@google.com40fbcae2013-12-20 14:48:38 +000057msaa4 = Config(config='msaa4', viewport=[str(DEFAULT_VIEWPORT_X),
58 str(DEFAULT_VIEWPORT_Y)])
borenet@google.com1ce5cef2013-05-07 12:09:54 +000059
commit-bot@chromium.orga6d46cb2014-01-14 18:47:07 +000060msaa16 = Config(config='msaa16', viewport=[str(DEFAULT_VIEWPORT_X),
61 str(DEFAULT_VIEWPORT_Y)])
62
commit-bot@chromium.orgd82aae72014-05-21 21:51:48 +000063viewport_angle = Config(config='angle', viewport=[str(DEFAULT_VIEWPORT_X),
64 str(DEFAULT_VIEWPORT_Y)])
borenet@google.com1ce5cef2013-05-07 12:09:54 +000065
borenet@google.com1558d682012-12-12 20:13:26 +000066# 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.
69bench_pictures_cfg = {
commit-bot@chromium.org05fadd12014-05-21 20:18:49 +000070 'angle': [viewport_angle],
borenet@google.com40fbcae2013-12-20 14:48:38 +000071 'debug': [ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y)],
borenet@google.com1558d682012-12-12 20:13:26 +000072 'default': default_configs,
borenet@google.com40fbcae2013-12-20 14:48:38 +000073 '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],
commit-bot@chromium.org1b3beef2014-05-02 19:59:59 +000081 'intel_rhb': default_no_gpu,
commit-bot@chromium.orga6d46cb2014-01-14 18:47:07 +000082 'default_msaa16': default_configs + [msaa16],
scroggo@google.com161e1ba2013-03-04 16:41:06 +000083}