Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 from benchmarks import silk_flags | 5 from benchmarks import silk_flags |
| 6 from measurements import repaint | 6 from measurements import repaint as repaint_measurement |
| 7 import page_sets | 7 import page_sets |
| 8 from telemetry import benchmark | 8 from telemetry import benchmark |
| 9 | 9 |
| 10 | 10 |
| 11 class _Repaint(benchmark.Benchmark): | |
| 12 @classmethod | |
| 13 def AddCommandLineArgs(cls, parser): | |
| 14 print 'Repaint.AddCommandLineArgs' | |
| 15 parser.add_option('--mode', type='string', | |
| 16 default='viewport', | |
| 17 help='Invalidation mode. ' | |
| 18 'Supported values: fixed_size, layer, random, viewport.') | |
| 19 parser.add_option('--width', type='int', | |
| 20 default=None, | |
| 21 help='Width of invalidations for fixed_size mode.') | |
| 22 parser.add_option('--height', type='int', | |
| 23 default=None, | |
| 24 help='Height of invalidations for fixed_size mode.') | |
|
vmiura
2014/10/14 23:16:08
I'm not sure the approach of removing command line
| |
| 25 | |
| 26 def CreatePageTest(self, options): | |
| 27 return repaint_measurement.Repaint(options.mode, options.width, | |
| 28 options.height) | |
| 29 | |
| 11 @benchmark.Enabled('android') | 30 @benchmark.Enabled('android') |
| 12 class RepaintKeyMobileSites(benchmark.Benchmark): | 31 class RepaintKeyMobileSites(_Repaint): |
| 13 """Measures repaint performance on the key mobile sites. | 32 """Measures repaint performance on the key mobile sites. |
| 14 | 33 |
| 15 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" | 34 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" |
| 16 test = repaint.Repaint | |
| 17 page_set = page_sets.KeyMobileSitesPageSet | 35 page_set = page_sets.KeyMobileSitesPageSet |
| 18 | 36 |
| 19 | 37 |
| 20 @benchmark.Enabled('android') | 38 @benchmark.Enabled('android') |
| 21 class RepaintGpuRasterizationKeyMobileSites(benchmark.Benchmark): | 39 class RepaintGpuRasterizationKeyMobileSites(_Repaint): |
| 22 """Measures repaint performance on the key mobile sites with forced GPU | 40 """Measures repaint performance on the key mobile sites with forced GPU |
| 23 rasterization. | 41 rasterization. |
| 24 | 42 |
| 25 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" | 43 http://www.chromium.org/developers/design-documents/rendering-benchmarks""" |
| 26 tag = 'gpu_rasterization' | 44 tag = 'gpu_rasterization' |
| 27 test = repaint.Repaint | |
| 28 page_set = page_sets.KeyMobileSitesPageSet | 45 page_set = page_sets.KeyMobileSitesPageSet |
| 29 def CustomizeBrowserOptions(self, options): | 46 def CustomizeBrowserOptions(self, options): |
| 30 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) | 47 silk_flags.CustomizeBrowserOptionsForGpuRasterization(options) |
| OLD | NEW |