OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <map> | 5 #include <map> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 TEST_P(FrameRateCompositingTest, content) { \ | 263 TEST_P(FrameRateCompositingTest, content) { \ |
264 RunTest(#content); \ | 264 RunTest(#content); \ |
265 } | 265 } |
266 | 266 |
267 INSTANTIATE_TEST_CASE_P(, FrameRateCompositingTest, ::testing::Values( | 267 INSTANTIATE_TEST_CASE_P(, FrameRateCompositingTest, ::testing::Values( |
268 0, | 268 0, |
269 kUseGpu | kForceGpuComposited, | 269 kUseGpu | kForceGpuComposited, |
270 kUseReferenceBuild, | 270 kUseReferenceBuild, |
271 kUseReferenceBuild | kUseGpu | kForceGpuComposited)); | 271 kUseReferenceBuild | kUseGpu | kForceGpuComposited)); |
272 | 272 |
273 // crbug.com/132133 | |
274 #if !defined(OS_WIN) | |
275 FRAME_RATE_TEST_WITH_AND_WITHOUT_ACCELERATED_COMPOSITING(blank); | 273 FRAME_RATE_TEST_WITH_AND_WITHOUT_ACCELERATED_COMPOSITING(blank); |
276 FRAME_RATE_TEST_WITH_AND_WITHOUT_ACCELERATED_COMPOSITING(googleblog); | 274 FRAME_RATE_TEST_WITH_AND_WITHOUT_ACCELERATED_COMPOSITING(googleblog); |
277 #endif | |
278 | 275 |
279 typedef FrameRateTest FrameRateNoVsyncCanvasInternalTest; | 276 typedef FrameRateTest FrameRateNoVsyncCanvasInternalTest; |
280 | 277 |
281 // Tests for animated 2D canvas content with and without disabling vsync | 278 // Tests for animated 2D canvas content with and without disabling vsync |
282 #define INTERNAL_FRAME_RATE_TEST_CANVAS_WITH_AND_WITHOUT_NOVSYNC(content) \ | 279 #define INTERNAL_FRAME_RATE_TEST_CANVAS_WITH_AND_WITHOUT_NOVSYNC(content) \ |
283 TEST_P(FrameRateNoVsyncCanvasInternalTest, content) { \ | 280 TEST_P(FrameRateNoVsyncCanvasInternalTest, content) { \ |
284 RunTest(#content); \ | 281 RunTest(#content); \ |
285 } | 282 } |
286 | 283 |
287 INSTANTIATE_TEST_CASE_P(, FrameRateNoVsyncCanvasInternalTest, ::testing::Values( | 284 INSTANTIATE_TEST_CASE_P(, FrameRateNoVsyncCanvasInternalTest, ::testing::Values( |
288 kInternal | kHasRedirect, | 285 kInternal | kHasRedirect, |
289 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu, | 286 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu, |
290 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu | kDisableVsync, | 287 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu | kDisableVsync, |
291 kUseReferenceBuild | kInternal | kHasRedirect, | 288 kUseReferenceBuild | kInternal | kHasRedirect, |
292 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu, | 289 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu, |
293 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu | | 290 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu | |
294 kDisableVsync)); | 291 kDisableVsync)); |
295 | 292 |
296 // crbug.com/132133 | |
297 #if !defined(OS_WIN) | |
298 INTERNAL_FRAME_RATE_TEST_CANVAS_WITH_AND_WITHOUT_NOVSYNC(fishbowl) | 293 INTERNAL_FRAME_RATE_TEST_CANVAS_WITH_AND_WITHOUT_NOVSYNC(fishbowl) |
299 #endif | |
300 | 294 |
301 typedef FrameRateTest FrameRateGpuCanvasInternalTest; | 295 typedef FrameRateTest FrameRateGpuCanvasInternalTest; |
302 | 296 |
303 // Tests for animated 2D canvas content to be tested only with GPU | 297 // Tests for animated 2D canvas content to be tested only with GPU |
304 // acceleration. | 298 // acceleration. |
305 // tests are run with and without Vsync | 299 // tests are run with and without Vsync |
306 #define INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(content) \ | 300 #define INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(content) \ |
307 TEST_P(FrameRateGpuCanvasInternalTest, content) { \ | 301 TEST_P(FrameRateGpuCanvasInternalTest, content) { \ |
308 RunTest(#content); \ | 302 RunTest(#content); \ |
309 } | 303 } |
310 | 304 |
311 INSTANTIATE_TEST_CASE_P(, FrameRateGpuCanvasInternalTest, ::testing::Values( | 305 INSTANTIATE_TEST_CASE_P(, FrameRateGpuCanvasInternalTest, ::testing::Values( |
312 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu, | 306 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu, |
313 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu | kDisableVsync, | 307 kIsGpuCanvasTest | kInternal | kHasRedirect | kUseGpu | kDisableVsync, |
314 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu, | 308 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu, |
315 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu | | 309 kIsGpuCanvasTest | kUseReferenceBuild | kInternal | kHasRedirect | kUseGpu | |
316 kDisableVsync)); | 310 kDisableVsync)); |
317 | 311 |
318 // crbug.com/132133 | |
319 #if !defined(OS_WIN) | |
320 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(fireflies) | 312 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(fireflies) |
321 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(FishIE) | 313 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(FishIE) |
322 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(speedreading) | 314 INTERNAL_FRAME_RATE_TEST_CANVAS_GPU(speedreading) |
323 #endif | |
324 | 315 |
325 } // namespace | 316 } // namespace |
OLD | NEW |