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