Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 """ | 6 """ |
| 7 This file defines the configurations in which bench_pictures should be run | 7 This file defines the configurations in which bench_pictures should be run |
| 8 on various platforms. The buildbots read these configurations from the | 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 | 9 bench_pictures_cfg dictionary. Everything else in this file exists to help in |
| 10 constructing that dictionary. | 10 constructing that dictionary. |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 | 25 |
| 26 | 26 |
| 27 from bench_pictures_cfg_helper import * | 27 from bench_pictures_cfg_helper import * |
| 28 | 28 |
| 29 | 29 |
| 30 # Default tile sizes | 30 # Default tile sizes |
| 31 DEFAULT_TILE_X = '256' | 31 DEFAULT_TILE_X = '256' |
| 32 DEFAULT_TILE_Y = '256' | 32 DEFAULT_TILE_Y = '256' |
| 33 | 33 |
| 34 # Default viewport size | 34 # Default viewport size |
| 35 DEFAULT_VIEWPORT_X = 1500 | 35 DEFAULT_VIEWPORT_X = 1000 |
| 36 DEFAULT_VIEWPORT_Y = 1000 | 36 DEFAULT_VIEWPORT_Y = 1000 |
| 37 | 37 |
| 38 # Default scale factor for scaled configs. | |
| 39 DEFAULT_SCALE = 1.1 | |
| 38 | 40 |
| 39 # Configs to run on most bots | 41 # Configs to run on most bots |
| 40 default_configs = [ | 42 default_configs = [ |
| 41 # Basic CPU and GPU configs | |
| 42 TiledBitmapConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y), | |
| 43 | |
| 44 # Viewport CPU and GPU | 43 # Viewport CPU and GPU |
| 45 ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y), | 44 ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y), |
| 46 ViewportGPUConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y), | 45 ViewportGPUConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y), |
| 47 | 46 |
| 48 # CopyTiles | 47 # Scaled viewport, CPU and GPU |
| 49 CopyTilesConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y), | 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)), | |
| 50 | 52 |
| 51 # Record | 53 # Record |
| 52 RecordConfig(), | 54 RecordConfig(), |
| 53 | 55 |
| 54 # Multi-threaded | |
| 55 MultiThreadTileConfig(4, DEFAULT_TILE_X, DEFAULT_TILE_Y), | |
| 56 | |
| 57 # Different tile sizes | |
| 58 TiledBitmapConfig(512, 512), | |
| 59 | |
| 60 # Different bounding box heirarchies, for different modes. | 56 # Different bounding box heirarchies, for different modes. |
|
robertphillips
2013/12/19 17:41:15
Remove RecordRTreeConfig()?
borenet
2013/12/20 14:21:14
Gladly.
| |
| 61 RecordRTreeConfig(), | 57 RecordRTreeConfig(), |
| 62 PlaybackCreationRTreeConfig(), | 58 RecordGridConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y), |
| 63 TileRTreeConfig( DEFAULT_TILE_X, DEFAULT_TILE_Y), | |
| 64 RecordGridConfig( DEFAULT_TILE_X, DEFAULT_TILE_Y), | |
| 65 PlaybackCreationGridConfig( DEFAULT_TILE_X, DEFAULT_TILE_Y), | |
| 66 TileGridConfig( DEFAULT_TILE_X, DEFAULT_TILE_Y), | |
| 67 ] | 59 ] |
| 68 | 60 |
| 69 | 61 default_no_gpu = [cfg for cfg in default_configs if cfg['config'] != 'gpu'] |
| 70 def AndroidConfigList(tile_size, scale, cores, viewport, do_gpu=True): | |
| 71 tile_x = tile_size[0] | |
| 72 tile_y = tile_size[1] | |
| 73 | |
| 74 viewport_x = viewport[0] | |
| 75 viewport_y = viewport[1] | |
| 76 | |
| 77 configs = [ | |
| 78 # Record | |
| 79 RecordConfig( scale=str(scale)), | |
| 80 RecordRTreeConfig(scale=str(scale)), | |
| 81 RecordGridConfig( tile_x, tile_y, scale=str(scale)), | |
| 82 | |
| 83 # Tiled playback | |
| 84 TiledBitmapConfig(tile_x, tile_y, scale=str(scale)), | |
| 85 TileRTreeConfig( tile_x, tile_y, scale=str(scale)), | |
| 86 TileGridConfig( tile_x, tile_y, scale=str(scale)), | |
| 87 | |
| 88 # Viewport playback | |
| 89 ViewportBitmapConfig(viewport_x, viewport_y, scale=str(scale)), | |
| 90 ViewportRTreeConfig( viewport_x, viewport_y, scale=str(scale)), | |
| 91 ] | |
| 92 | |
| 93 if do_gpu: | |
| 94 configs.append(ViewportGPUConfig(viewport_x, viewport_y, scale=str(scale))) | |
| 95 | |
| 96 # Multicore | |
| 97 for num_cores in cores: | |
| 98 configs.append(MultiThreadTileConfig(num_cores, tile_x, tile_y, | |
| 99 scale=str(scale))) | |
| 100 | |
| 101 return configs | |
| 102 | 62 |
| 103 | 63 |
| 104 msaa4 = Config(config='msaa4') | 64 msaa4 = Config(config='msaa4', viewport=[str(DEFAULT_VIEWPORT_X), |
| 65 str(DEFAULT_VIEWPORT_Y)]) | |
| 105 | 66 |
| 67 viewport_angle = Config(config='angle', | |
| 68 viewport=[DEFAULT_TILE_X, DEFAULT_TILE_Y]) | |
| 106 | 69 |
| 107 # This dictionary defines the sets of configs for all platforms. Each config is | 70 # This dictionary defines the sets of configs for all platforms. Each config is |
| 108 # a dictionary of key/value pairs directly corresponding to the command-line | 71 # a dictionary of key/value pairs directly corresponding to the command-line |
| 109 # flags passed to bench_pictures. | 72 # flags passed to bench_pictures. |
| 110 bench_pictures_cfg = { | 73 bench_pictures_cfg = { |
| 111 'angle': [TiledConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y, config='angle')], | 74 'angle': [viewport_angle, msaa4], |
| 112 'debug': [TiledBitmapConfig(DEFAULT_TILE_X, DEFAULT_TILE_Y)], | 75 'debug': [ViewportBitmapConfig(DEFAULT_VIEWPORT_X, DEFAULT_VIEWPORT_Y)], |
| 113 'default': default_configs, | 76 'default': default_configs, |
| 114 'no_gpu': [cfg for cfg in default_configs if cfg['config'] != 'gpu'], | 77 'no_gpu': default_no_gpu, |
| 115 'nexus_s': AndroidConfigList((256, 256), 0.4897, [], (480, 800), | 78 'nexus_s': default_no_gpu, |
| 116 do_gpu=False), | 79 'xoom': default_configs, |
| 117 'xoom': AndroidConfigList((256, 256), 1.2244, [], (1200, 800)), | 80 'galaxy_nexus': default_configs, |
| 118 'galaxy_nexus': AndroidConfigList((256, 256), 0.8163, [], (800, 1280)), | 81 'nexus_4': default_configs + [msaa4], |
| 119 'nexus_4': AndroidConfigList((256, 256), 0.7836, [], (768, 1280)) + \ | 82 'nexus_7': default_configs, |
| 120 [msaa4], | 83 'nexus_10': default_no_gpu + [msaa4], |
|
borenet
2013/12/16 20:53:50
I don't remember why the N10 was running without g
robertphillips
2013/12/19 17:41:15
Right!
borenet
2013/12/20 14:21:14
Done.
| |
| 121 'nexus_7': AndroidConfigList((256, 256), 1.3061, [4], (1280, 800)), | 84 'razr_i': default_configs + [msaa4], |
| 122 'nexus_10': AndroidConfigList((512, 512), 2.6122, [], (2560, 1600), | 85 'intel_rhb': default_configs + [msaa4], |
| 123 do_gpu=False) + [msaa4], | |
| 124 'razr_i': AndroidConfigList((256, 256), 0.5510, [], (540, 960)) + \ | |
| 125 [msaa4], | |
| 126 'intel_rhb': AndroidConfigList((256, 256), 0.5510, [], (540, 960)) + \ | |
| 127 [msaa4], | |
| 128 } | 86 } |
| OLD | NEW |