OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Archives or replays webpages and creates SKPs in a Google Storage location. | 6 """Archives or replays webpages and creates SKPs in a Google Storage location. |
7 | 7 |
8 To archive webpages and store SKP files (archives should be rarely updated): | 8 To archive webpages and store SKP files (archives should be rarely updated): |
9 | 9 |
10 cd skia | 10 cd skia |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 GS_FINE_GRAINED_ACL_LIST = [ | 113 GS_FINE_GRAINED_ACL_LIST = [ |
114 (gs_utils.GSUtils.IdType.GROUP_BY_DOMAIN, 'google.com', | 114 (gs_utils.GSUtils.IdType.GROUP_BY_DOMAIN, 'google.com', |
115 gs_utils.GSUtils.Permission.READ), | 115 gs_utils.GSUtils.Permission.READ), |
116 ] | 116 ] |
117 | 117 |
118 # Path to Chromium's page sets. | 118 # Path to Chromium's page sets. |
119 CHROMIUM_PAGE_SETS_PATH = os.path.join('tools', 'perf', 'page_sets') | 119 CHROMIUM_PAGE_SETS_PATH = os.path.join('tools', 'perf', 'page_sets') |
120 | 120 |
121 # Dictionary of supported Chromium page sets to their file prefixes. | 121 # Dictionary of supported Chromium page sets to their file prefixes. |
122 CHROMIUM_PAGE_SETS_TO_PREFIX = { | 122 CHROMIUM_PAGE_SETS_TO_PREFIX = { |
123 # 'key_mobile_sites_smooth.py': 'keymobi', | 123 'key_mobile_sites_smooth.py': 'keymobi', |
124 # TODO(rmistry): Uncomment the below after it is verified that the above | 124 # TODO(rmistry): Uncomment the below after it is verified that the above |
125 # works. | 125 # works. |
126 # 'top_25_smooth.py': 'top25desk', | 126 # 'top_25_smooth.py': 'top25desk', |
127 } | 127 } |
128 | 128 |
129 | 129 |
130 def remove_prefix(s, prefix): | 130 def remove_prefix(s, prefix): |
131 if s.startswith(prefix): | 131 if s.startswith(prefix): |
132 return s[len(prefix):] | 132 return s[len(prefix):] |
133 return s | 133 return s |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 default=None) | 550 default=None) |
551 option_parser.add_option( | 551 option_parser.add_option( |
552 '', '--non-interactive', action='store_true', | 552 '', '--non-interactive', action='store_true', |
553 help='Runs the script without any prompts. If this flag is specified and ' | 553 help='Runs the script without any prompts. If this flag is specified and ' |
554 '--skia_tools is specified then the debugger is not run.', | 554 '--skia_tools is specified then the debugger is not run.', |
555 default=False) | 555 default=False) |
556 options, unused_args = option_parser.parse_args() | 556 options, unused_args = option_parser.parse_args() |
557 | 557 |
558 playback = SkPicturePlayback(options) | 558 playback = SkPicturePlayback(options) |
559 sys.exit(playback.Run()) | 559 sys.exit(playback.Run()) |
OLD | NEW |