aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/bench_pictures.cfg
blob: ca06a7ab6d132772d59907af71d32e44cf4e0e8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# 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'


# Configs to run on most bots
default_configs = [
  # Basic CPU and GPU configs
  TiledBitmapConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y),
  TiledGPUConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y),

  # CopyTiles
  CopyTilesConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y),

  # Record
  RecordConfig(),

  # Multi-threaded
  MultiThreadTileConfig(2, DEFAULT_TILE_X, DEFAULT_TILE_Y),
  MultiThreadTileConfig(3, DEFAULT_TILE_X, DEFAULT_TILE_Y),
  MultiThreadTileConfig(4, DEFAULT_TILE_X, DEFAULT_TILE_Y),

  # Different tile sizes
  TiledBitmapConfig(512, 512),
  TiledBitmapConfig(1024, 256),
  TiledBitmapConfig(1024, 64),

  # Different bounding box heirarchies, for different modes.
  RecordRTreeConfig(          DEFAULT_TILE_X, DEFAULT_TILE_Y),
  RecordGridConfig(           DEFAULT_TILE_X, DEFAULT_TILE_Y),
  PlaybackCreationRTreeConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y),
  PlaybackCreationGridConfig( DEFAULT_TILE_X, DEFAULT_TILE_Y),
  TileRTreeConfig(            DEFAULT_TILE_X, DEFAULT_TILE_Y),
  TileGridConfig(             DEFAULT_TILE_X, DEFAULT_TILE_Y),
]


# Configs to run on Android devices. This just excludes configs with
# '--mode playbackCreation'.
android_configs = [cfg for cfg in default_configs \
                   if cfg['mode'] != 'playbackCreation']


# 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 = {
  'debug': [TiledBitmapConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y)],
  'default': default_configs,
  'no_gpu': [cfg for cfg in default_configs if cfg['device'] != 'gpu'],
  'nexus_s': [cfg for cfg in android_configs if cfg['device'] != 'gpu'],
  'nexus_4': android_configs,
  'nexus_7': android_configs,
  'nexus_10': android_configs,
  'galaxy_nexus': android_configs,
  'xoom': android_configs,
}