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
3 # found in the LICENSE file.
5 from core
import perf_benchmark
7 from benchmarks
import silk_flags
8 from measurements
import smoothness
10 from telemetry
import benchmark
13 class _Repaint(perf_benchmark
.PerfBenchmark
):
15 def AddBenchmarkCommandLineArgs(cls
, parser
):
16 parser
.add_option('--mode', type='string',
18 help='Invalidation mode. '
19 'Supported values: fixed_size, layer, random, viewport.')
20 parser
.add_option('--width', type='int',
22 help='Width of invalidations for fixed_size mode.')
23 parser
.add_option('--height', type='int',
25 help='Height of invalidations for fixed_size mode.')
31 def CreateStorySet(self
, options
):
32 return page_sets
.KeyMobileSitesRepaintPageSet(
33 options
.mode
, options
.width
, options
.height
)
35 def CreatePageTest(self
, options
):
36 return smoothness
.Repaint()
39 #@benchmark.Enabled('android')
41 class RepaintKeyMobileSites(_Repaint
):
42 """Measures repaint performance on the key mobile sites.
44 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
48 return 'repaint.key_mobile_sites_repaint'
52 @benchmark.Enabled('android')
54 class RepaintGpuRasterizationKeyMobileSites(_Repaint
):
55 """Measures repaint performance on the key mobile sites with forced GPU
58 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
59 tag
= 'gpu_rasterization'
60 def SetExtraBrowserOptions(self
, options
):
61 silk_flags
.CustomizeBrowserOptionsForGpuRasterization(options
)
65 return 'repaint.gpu_rasterization.key_mobile_sites_repaint'