Change bench_pictures configs
Aiming at CPU vs GPU R=epoger@google.com, robertphillips@google.com Review URL: https://codereview.chromium.org/111893004 git-svn-id: http://skia.googlecode.com/svn/trunk@12799 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
33c3b1e171
commit
40fbcae783
@ -32,97 +32,52 @@ DEFAULT_TILE_X = '256'
|
||||
DEFAULT_TILE_Y = '256'
|
||||
|
||||
# Default viewport size
|
||||
DEFAULT_VIEWPORT_X = 1500
|
||||
DEFAULT_VIEWPORT_X = 1000
|
||||
DEFAULT_VIEWPORT_Y = 1000
|
||||
|
||||
# Default scale factor for scaled configs.
|
||||
DEFAULT_SCALE = 1.1
|
||||
|
||||
# Configs to run on most bots
|
||||
default_configs = [
|
||||
# Basic CPU and GPU configs
|
||||
TiledBitmapConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y),
|
||||
|
||||
# Viewport CPU and GPU
|
||||
ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y),
|
||||
ViewportGPUConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y),
|
||||
|
||||
# CopyTiles
|
||||
CopyTilesConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y),
|
||||
# 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)),
|
||||
|
||||
# Record
|
||||
RecordConfig(),
|
||||
|
||||
# Multi-threaded
|
||||
MultiThreadTileConfig(4, DEFAULT_TILE_X, DEFAULT_TILE_Y),
|
||||
|
||||
# Different tile sizes
|
||||
TiledBitmapConfig(512, 512),
|
||||
|
||||
# Different bounding box heirarchies, for different modes.
|
||||
RecordRTreeConfig(),
|
||||
PlaybackCreationRTreeConfig(),
|
||||
TileRTreeConfig( DEFAULT_TILE_X, DEFAULT_TILE_Y),
|
||||
RecordGridConfig( DEFAULT_TILE_X, DEFAULT_TILE_Y),
|
||||
PlaybackCreationGridConfig( DEFAULT_TILE_X, DEFAULT_TILE_Y),
|
||||
TileGridConfig( DEFAULT_TILE_X, DEFAULT_TILE_Y),
|
||||
RecordGridConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y),
|
||||
]
|
||||
|
||||
|
||||
def AndroidConfigList(tile_size, scale, cores, viewport, do_gpu=True):
|
||||
tile_x = tile_size[0]
|
||||
tile_y = tile_size[1]
|
||||
|
||||
viewport_x = viewport[0]
|
||||
viewport_y = viewport[1]
|
||||
|
||||
configs = [
|
||||
# Record
|
||||
RecordConfig( scale=str(scale)),
|
||||
RecordRTreeConfig(scale=str(scale)),
|
||||
RecordGridConfig( tile_x, tile_y, scale=str(scale)),
|
||||
|
||||
# Tiled playback
|
||||
TiledBitmapConfig(tile_x, tile_y, scale=str(scale)),
|
||||
TileRTreeConfig( tile_x, tile_y, scale=str(scale)),
|
||||
TileGridConfig( tile_x, tile_y, scale=str(scale)),
|
||||
|
||||
# Viewport playback
|
||||
ViewportBitmapConfig(viewport_x, viewport_y, scale=str(scale)),
|
||||
ViewportRTreeConfig( viewport_x, viewport_y, scale=str(scale)),
|
||||
]
|
||||
|
||||
if do_gpu:
|
||||
configs.append(ViewportGPUConfig(viewport_x, viewport_y, scale=str(scale)))
|
||||
|
||||
# Multicore
|
||||
for num_cores in cores:
|
||||
configs.append(MultiThreadTileConfig(num_cores, tile_x, tile_y,
|
||||
scale=str(scale)))
|
||||
|
||||
return configs
|
||||
default_no_gpu = [cfg for cfg in default_configs if cfg['config'] != 'gpu']
|
||||
|
||||
|
||||
msaa4 = Config(config='msaa4')
|
||||
msaa4 = Config(config='msaa4', viewport=[str(DEFAULT_VIEWPORT_X),
|
||||
str(DEFAULT_VIEWPORT_Y)])
|
||||
|
||||
viewport_angle = Config(config='angle',
|
||||
viewport=[DEFAULT_TILE_X, DEFAULT_TILE_Y])
|
||||
|
||||
# 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 = {
|
||||
'angle': [TiledConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y, config='angle')],
|
||||
'debug': [TiledBitmapConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y)],
|
||||
'angle': [viewport_angle, msaa4],
|
||||
'debug': [ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y)],
|
||||
'default': default_configs,
|
||||
'no_gpu': [cfg for cfg in default_configs if cfg['config'] != 'gpu'],
|
||||
'nexus_s': AndroidConfigList((256, 256), 0.4897, [], (480, 800),
|
||||
do_gpu=False),
|
||||
'xoom': AndroidConfigList((256, 256), 1.2244, [], (1200, 800)),
|
||||
'galaxy_nexus': AndroidConfigList((256, 256), 0.8163, [], (800, 1280)),
|
||||
'nexus_4': AndroidConfigList((256, 256), 0.7836, [], (768, 1280)) + \
|
||||
[msaa4],
|
||||
'nexus_7': AndroidConfigList((256, 256), 1.3061, [4], (1280, 800)),
|
||||
'nexus_10': AndroidConfigList((512, 512), 2.6122, [], (2560, 1600),
|
||||
do_gpu=False) + [msaa4],
|
||||
'razr_i': AndroidConfigList((256, 256), 0.5510, [], (540, 960)) + \
|
||||
[msaa4],
|
||||
'intel_rhb': AndroidConfigList((256, 256), 0.5510, [], (540, 960)) + \
|
||||
[msaa4],
|
||||
'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],
|
||||
'intel_rhb': default_configs + [msaa4],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user