Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / tools / perf / benchmarks / smoothness.py
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.
4
5 from benchmarks import silk_flags
6 import page_sets
7 from measurements import smoothness
8 from telemetry import benchmark
9
10
11 class SmoothnessTop25(benchmark.Benchmark):
12   """Measures rendering statistics while scrolling down the top 25 web pages.
13
14   http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
15   test = smoothness.Smoothness
16   page_set = page_sets.Top25PageSet
17
18
19 class SmoothnessToughFiltersCases(benchmark.Benchmark):
20   test = smoothness.Smoothness
21   page_set = page_sets.ToughFiltersCasesPageSet
22
23
24 @benchmark.Disabled('mac', 'win')  # crbug.com/388877, crbug.com/396127
25 class SmoothnessToughCanvasCases(benchmark.Benchmark):
26   test = smoothness.Smoothness
27   page_set = page_sets.ToughCanvasCasesPageSet
28
29
30 @benchmark.Disabled('android', 'mac')  # crbug.com/373812
31 class SmoothnessToughWebGLCases(benchmark.Benchmark):
32   test = smoothness.Smoothness
33   page_set = page_sets.ToughWebglCasesPageSet
34
35
36 class SmoothnessMaps(benchmark.Benchmark):
37   test = smoothness.Smoothness
38   page_set = page_sets.MapsPageSet
39
40
41 class SmoothnessKeyMobileSites(benchmark.Benchmark):
42   """Measures rendering statistics while scrolling down the key mobile sites.
43
44   http://www.chromium.org/developers/design-documents/rendering-benchmarks"""
45   test = smoothness.Smoothness
46   page_set = page_sets.KeyMobileSitesPageSet
47
48
49 @benchmark.Disabled('android')  # crbug.com/350692
50 class SmoothnessToughAnimationCases(benchmark.Benchmark):
51   test = smoothness.Smoothness
52   page_set = page_sets.ToughAnimationCasesPageSet
53
54
55 class SmoothnessKeySilkCases(benchmark.Benchmark):
56   """Measures rendering statistics for the key silk cases without GPU
57   rasterization
58   """
59   test = smoothness.Smoothness
60   page_set = page_sets.KeySilkCasesPageSet
61
62
63 class SmoothnessFastPathKeySilkCases(benchmark.Benchmark):
64   """Measures rendering statistics for the key silk cases without GPU
65   rasterization using bleeding edge rendering fast paths.
66   """
67   tag = 'fast_path'
68   test = smoothness.Smoothness
69   page_set = page_sets.KeySilkCasesPageSet
70   def CustomizeBrowserOptions(self, options):
71     silk_flags.CustomizeBrowserOptionsForFastPath(options)
72
73
74 # GPU rasterization does not work on J devices
75 @benchmark.Disabled('j', 'android')  # crbug.com/399125
76 class SmoothnessGpuRasterizationTop25(benchmark.Benchmark):
77   """Measures rendering statistics for the top 25 with GPU rasterization
78   """
79   tag = 'gpu_rasterization'
80   test = smoothness.Smoothness
81   page_set = page_sets.Top25PageSet
82   def CustomizeBrowserOptions(self, options):
83     silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
84
85
86 # GPU rasterization does not work on J devices
87 @benchmark.Disabled('j', 'android')  # crbug.com/399125
88 class SmoothnessGpuRasterizationKeyMobileSites(benchmark.Benchmark):
89   """Measures rendering statistics for the key mobile sites with GPU
90   rasterization
91   """
92   tag = 'gpu_rasterization'
93   test = smoothness.Smoothness
94   page_set = page_sets.KeyMobileSitesPageSet
95   def CustomizeBrowserOptions(self, options):
96     silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
97
98
99 @benchmark.Disabled('android')  # crbug.com/399125
100 class SmoothnessGpuRasterizationKeySilkCases(benchmark.Benchmark):
101   """Measures rendering statistics for the key silk cases with GPU rasterization
102   """
103   tag = 'gpu_rasterization'
104   test = smoothness.Smoothness
105   page_set = page_sets.KeySilkCasesPageSet
106   def CustomizeBrowserOptions(self, options):
107     silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
108
109
110 @benchmark.Disabled('android')  # crbug.com/399125
111 class SmoothnessFastPathGpuRasterizationKeySilkCases(
112     SmoothnessGpuRasterizationKeySilkCases):
113   """Measures rendering statistics for the key silk cases with GPU rasterization
114   using bleeding edge rendering fast paths.
115   """
116   tag = 'fast_path_gpu_rasterization'
117   test = smoothness.Smoothness
118   page_set = page_sets.KeySilkCasesPageSet
119   def CustomizeBrowserOptions(self, options):
120     super(SmoothnessFastPathGpuRasterizationKeySilkCases, self). \
121         CustomizeBrowserOptions(options)
122     silk_flags.CustomizeBrowserOptionsForFastPath(options)
123
124
125 @benchmark.Enabled('android')
126 class SmoothnessSimpleMobilePages(benchmark.Benchmark):
127   """Measures rendering statistics for pinch-zooming into the tough pinch zoom
128   cases
129   """
130   test = smoothness.Smoothness
131   page_set = page_sets.SimpleMobileSitesPageSet
132
133
134 @benchmark.Enabled('android')
135 class SmoothnessToughPinchZoomCases(benchmark.Benchmark):
136   """Measures rendering statistics for pinch-zooming into the tough pinch zoom
137   cases
138   """
139   test = smoothness.Smoothness
140   page_set = page_sets.ToughPinchZoomCasesPageSet
141
142
143 class SmoothnessPolymer(benchmark.Benchmark):
144   """Measures rendering statistics for Polymer cases.
145   """
146   test = smoothness.Smoothness
147   page_set = page_sets.PolymerPageSet
148
149
150 class SmoothnessFastPathPolymer(benchmark.Benchmark):
151   """Measures rendering statistics for the Polymer cases without GPU
152   rasterization using bleeding edge rendering fast paths.
153   """
154   tag = 'fast_path'
155   test = smoothness.Smoothness
156   page_set = page_sets.PolymerPageSet
157   def CustomizeBrowserOptions(self, options):
158     silk_flags.CustomizeBrowserOptionsForFastPath(options)
159
160 # GPU rasterization does not work on J devices
161 @benchmark.Disabled('j', 'android')  # crbug.com/399125
162 class SmoothnessGpuRasterizationPolymer(benchmark.Benchmark):
163   """Measures rendering statistics for the Polymer cases with GPU rasterization
164   """
165   tag = 'gpu_rasterization'
166   test = smoothness.Smoothness
167   page_set = page_sets.PolymerPageSet
168   def CustomizeBrowserOptions(self, options):
169     silk_flags.CustomizeBrowserOptionsForGpuRasterization(options)
170
171
172 @benchmark.Disabled('android')  # crbug.com/399125
173 class SmoothnessFastPathGpuRasterizationPolymer(
174     SmoothnessGpuRasterizationPolymer):
175   """Measures rendering statistics for the Polymer cases with GPU rasterization
176   using bleeding edge rendering fast paths.
177   """
178   tag = 'fast_path_gpu_rasterization'
179   test = smoothness.Smoothness
180   page_set = page_sets.PolymerPageSet
181   def CustomizeBrowserOptions(self, options):
182     super(SmoothnessFastPathGpuRasterizationPolymer, self). \
183         CustomizeBrowserOptions(options)
184     silk_flags.CustomizeBrowserOptionsForFastPath(options)