1 # Copyright 2013 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 benchmarks
import silk_flags
7 from measurements
import smoothness
8 from telemetry
import benchmark
11 class SmoothnessTop25(benchmark
.Benchmark
):
12 """Measures rendering statistics while scrolling down the top 25 web pages.
14 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
15 test
= smoothness
.Smoothness
16 page_set
= page_sets
.Top25SmoothPageSet
19 class SmoothnessToughFiltersCases(benchmark
.Benchmark
):
20 test
= smoothness
.Smoothness
21 page_set
= page_sets
.ToughFiltersCasesPageSet
24 @benchmark.Disabled('mac') # crbug.com/388877
25 class SmoothnessToughCanvasCases(benchmark
.Benchmark
):
26 test
= smoothness
.Smoothness
27 page_set
= page_sets
.ToughCanvasCasesPageSet
30 @benchmark.Disabled('android', 'mac', 'win') # crbug.com/373812
31 class SmoothnessToughWebGLCases(benchmark
.Benchmark
):
32 test
= smoothness
.Smoothness
33 page_set
= page_sets
.ToughWebglCasesPageSet
36 @benchmark.Enabled('android')
37 class SmoothnessMaps(benchmark
.Benchmark
):
38 test
= smoothness
.Smoothness
39 page_set
= page_sets
.MapsPageSet
42 @benchmark.Enabled('android')
43 class SmoothnessKeyMobileSites(benchmark
.Benchmark
):
44 """Measures rendering statistics while scrolling down the key mobile sites.
46 http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
47 test
= smoothness
.Smoothness
48 page_set
= page_sets
.KeyMobileSitesPageSet
51 class SmoothnessToughAnimationCases(benchmark
.Benchmark
):
52 test
= smoothness
.Smoothness
53 page_set
= page_sets
.ToughAnimationCasesPageSet
56 @benchmark.Enabled('android')
57 class SmoothnessKeySilkCases(benchmark
.Benchmark
):
58 """Measures rendering statistics for the key silk cases without GPU
61 test
= smoothness
.Smoothness
62 page_set
= page_sets
.KeySilkCasesPageSet
65 @benchmark.Enabled('android')
66 class SmoothnessGpuRasterizationTop25(benchmark
.Benchmark
):
67 """Measures rendering statistics for the top 25 with GPU rasterization
69 tag
= 'gpu_rasterization'
70 test
= smoothness
.Smoothness
71 page_set
= page_sets
.Top25SmoothPageSet
72 def CustomizeBrowserOptions(self
, options
):
73 silk_flags
.CustomizeBrowserOptionsForGpuRasterization(options
)
76 @benchmark.Enabled('android')
77 class SmoothnessGpuRasterizationKeyMobileSites(benchmark
.Benchmark
):
78 """Measures rendering statistics for the key mobile sites with GPU
81 tag
= 'gpu_rasterization'
82 test
= smoothness
.Smoothness
83 page_set
= page_sets
.KeyMobileSitesPageSet
84 def CustomizeBrowserOptions(self
, options
):
85 silk_flags
.CustomizeBrowserOptionsForGpuRasterization(options
)
88 @benchmark.Enabled('android')
89 class SmoothnessSyncScrollKeyMobileSites(benchmark
.Benchmark
):
90 """Measures rendering statistics for the key mobile sites with synchronous
91 (main thread) scrolling.
94 test
= smoothness
.Smoothness
95 page_set
= page_sets
.KeyMobileSitesPageSet
96 def CustomizeBrowserOptions(self
, options
):
97 silk_flags
.CustomizeBrowserOptionsForSyncScrolling(options
)
99 @benchmark.Enabled('android')
100 class SmoothnessSimpleMobilePages(benchmark
.Benchmark
):
101 """Measures rendering statistics for simple mobile sites page set """
102 test
= smoothness
.Smoothness
103 page_set
= page_sets
.SimpleMobileSitesPageSet
106 @benchmark.Enabled('android')
107 class SmoothnessToughPinchZoomCases(benchmark
.Benchmark
):
108 """Measures rendering statistics for pinch-zooming into the tough pinch zoom
111 test
= smoothness
.Smoothness
112 page_set
= page_sets
.ToughPinchZoomCasesPageSet
115 @benchmark.Enabled('android')
116 class SmoothnessPolymer(benchmark
.Benchmark
):
117 """Measures rendering statistics for Polymer cases.
119 test
= smoothness
.Smoothness
120 page_set
= page_sets
.PolymerPageSet
123 @benchmark.Enabled('android')
124 class SmoothnessGpuRasterizationPolymer(benchmark
.Benchmark
):
125 """Measures rendering statistics for the Polymer cases with GPU rasterization
127 tag
= 'gpu_rasterization'
128 test
= smoothness
.Smoothness
129 page_set
= page_sets
.PolymerPageSet
130 def CustomizeBrowserOptions(self
, options
):
131 silk_flags
.CustomizeBrowserOptionsForGpuRasterization(options
)
133 class SmoothnessToughFastScrollingCases(benchmark
.Benchmark
):
134 test
= smoothness
.Smoothness
135 page_set
= page_sets
.ToughScrollingCasesPageSet
136 options
= {'page_label_filter' : 'fastscrolling'}