2012-12-12 20:13:26 +00:00
|
|
|
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
This file defines the configurations in which bench_pictures should be run
|
|
|
|
on various platforms. The buildbots read these configurations from the
|
|
|
|
bench_pictures_cfg dictionary. Everything else in this file exists to help in
|
|
|
|
constructing that dictionary.
|
|
|
|
|
|
|
|
This code is executed directly on the buildbot so that convenient things like
|
|
|
|
variables and loops can be used to avoid unnecessary verbosity. With great power
|
|
|
|
comes great responsibility; don't put any nasty code here. To reiterate, code in
|
|
|
|
this file will be directly executed on the build slaves.
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
|
if 'import_path' in globals():
|
|
|
|
sys.path.append(import_path)
|
|
|
|
|
|
|
|
|
|
|
|
from bench_pictures_cfg_helper import *
|
|
|
|
|
|
|
|
|
|
|
|
# Default tile sizes
|
|
|
|
DEFAULT_TILE_X = '256'
|
|
|
|
DEFAULT_TILE_Y = '256'
|
|
|
|
|
2013-09-09 15:13:25 +00:00
|
|
|
# Default viewport size
|
2013-12-20 14:48:38 +00:00
|
|
|
DEFAULT_VIEWPORT_X = 1000
|
2013-09-09 15:13:25 +00:00
|
|
|
DEFAULT_VIEWPORT_Y = 1000
|
|
|
|
|
2013-12-20 14:48:38 +00:00
|
|
|
# Default scale factor for scaled configs.
|
|
|
|
DEFAULT_SCALE = 1.1
|
2012-12-12 20:13:26 +00:00
|
|
|
|
|
|
|
# Configs to run on most bots
|
|
|
|
default_configs = [
|
2013-09-09 15:13:25 +00:00
|
|
|
# Viewport CPU and GPU
|
2013-09-09 15:24:40 +00:00
|
|
|
ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y),
|
|
|
|
ViewportGPUConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y),
|
2012-12-12 20:13:26 +00:00
|
|
|
|
2013-12-20 14:48:38 +00:00
|
|
|
# Scaled viewport, CPU and GPU
|
|
|
|
ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y,
|
|
|
|
scale=str(DEFAULT_SCALE)),
|
|
|
|
ViewportGPUConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y,
|
|
|
|
scale=str(DEFAULT_SCALE)),
|
2012-12-12 20:13:26 +00:00
|
|
|
]
|
|
|
|
|
2013-12-20 14:48:38 +00:00
|
|
|
default_no_gpu = [cfg for cfg in default_configs if cfg['config'] != 'gpu']
|
2012-12-12 20:13:26 +00:00
|
|
|
|
|
|
|
|
2013-12-20 14:48:38 +00:00
|
|
|
msaa4 = Config(config='msaa4', viewport=[str(DEFAULT_VIEWPORT_X),
|
|
|
|
str(DEFAULT_VIEWPORT_Y)])
|
2013-05-07 12:09:54 +00:00
|
|
|
|
2014-01-14 18:47:07 +00:00
|
|
|
msaa16 = Config(config='msaa16', viewport=[str(DEFAULT_VIEWPORT_X),
|
|
|
|
str(DEFAULT_VIEWPORT_Y)])
|
|
|
|
|
2014-05-21 21:51:48 +00:00
|
|
|
viewport_angle = Config(config='angle', viewport=[str(DEFAULT_VIEWPORT_X),
|
|
|
|
str(DEFAULT_VIEWPORT_Y)])
|
2013-05-07 12:09:54 +00:00
|
|
|
|
2012-12-12 20:13:26 +00:00
|
|
|
# This dictionary defines the sets of configs for all platforms. Each config is
|
|
|
|
# a dictionary of key/value pairs directly corresponding to the command-line
|
|
|
|
# flags passed to bench_pictures.
|
|
|
|
bench_pictures_cfg = {
|
2014-05-21 20:18:49 +00:00
|
|
|
'angle': [viewport_angle],
|
2013-12-20 14:48:38 +00:00
|
|
|
'debug': [ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y)],
|
2012-12-12 20:13:26 +00:00
|
|
|
'default': default_configs,
|
2013-12-20 14:48:38 +00:00
|
|
|
'no_gpu': default_no_gpu,
|
|
|
|
'nexus_s': default_no_gpu,
|
|
|
|
'xoom': default_configs,
|
|
|
|
'galaxy_nexus': default_configs,
|
|
|
|
'nexus_4': default_configs + [msaa4],
|
|
|
|
'nexus_7': default_configs,
|
|
|
|
'nexus_10': default_configs + [msaa4],
|
|
|
|
'razr_i': default_configs + [msaa4],
|
2014-05-02 19:59:59 +00:00
|
|
|
'intel_rhb': default_no_gpu,
|
2014-01-14 18:47:07 +00:00
|
|
|
'default_msaa16': default_configs + [msaa16],
|
2013-03-04 16:41:06 +00:00
|
|
|
}
|