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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "chrome/test/base/test_switches.h" | 23 #include "chrome/test/base/test_switches.h" |
24 #include "chrome/test/base/tracing.h" | 24 #include "chrome/test/base/tracing.h" |
25 #include "chrome/test/base/ui_test_utils.h" | 25 #include "chrome/test/base/ui_test_utils.h" |
26 #include "chrome/test/perf/browser_perf_test.h" | 26 #include "chrome/test/perf/browser_perf_test.h" |
27 #include "chrome/test/perf/perf_test.h" | 27 #include "chrome/test/perf/perf_test.h" |
28 #include "content/public/browser/web_contents.h" | 28 #include "content/public/browser/web_contents.h" |
29 #include "content/public/browser/web_contents_view.h" | 29 #include "content/public/browser/web_contents_view.h" |
30 #include "content/public/common/content_switches.h" | 30 #include "content/public/common/content_switches.h" |
31 #include "content/public/test/browser_test_utils.h" | 31 #include "content/public/test/browser_test_utils.h" |
32 #include "content/public/test/test_utils.h" | 32 #include "content/public/test/test_utils.h" |
33 #include "content/test/gpu/gpu_test_config.h" | |
34 #include "googleurl/src/gurl.h" | 33 #include "googleurl/src/gurl.h" |
| 34 #include "gpu/config/gpu_test_config.h" |
35 #include "net/base/net_util.h" | 35 #include "net/base/net_util.h" |
36 #include "net/dns/mock_host_resolver.h" | 36 #include "net/dns/mock_host_resolver.h" |
37 #include "testing/gtest/include/gtest/gtest.h" | 37 #include "testing/gtest/include/gtest/gtest.h" |
38 #include "third_party/skia/include/core/SkBitmap.h" | 38 #include "third_party/skia/include/core/SkBitmap.h" |
39 #include "third_party/skia/include/core/SkColor.h" | 39 #include "third_party/skia/include/core/SkColor.h" |
40 #include "ui/gfx/codec/png_codec.h" | 40 #include "ui/gfx/codec/png_codec.h" |
41 #include "ui/gl/gl_switches.h" | 41 #include "ui/gl/gl_switches.h" |
42 | 42 |
43 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
44 #include "base/win/windows_version.h" | 44 #include "base/win/windows_version.h" |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, DrawImageShadowGPU) { | 538 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, DrawImageShadowGPU) { |
539 RunTest("canvas2d_balls_with_shadow", kNone | kIsGpuCanvasTest); | 539 RunTest("canvas2d_balls_with_shadow", kNone | kIsGpuCanvasTest); |
540 } | 540 } |
541 | 541 |
542 IN_PROC_BROWSER_TEST_F(ThroughputTestThread, DrawImageShadowGPU) { | 542 IN_PROC_BROWSER_TEST_F(ThroughputTestThread, DrawImageShadowGPU) { |
543 RunTest("canvas2d_balls_with_shadow", kNone | kIsGpuCanvasTest); | 543 RunTest("canvas2d_balls_with_shadow", kNone | kIsGpuCanvasTest); |
544 } | 544 } |
545 | 545 |
546 IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasToCanvasDrawSW) { | 546 IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasToCanvasDrawSW) { |
547 if (IsGpuAvailable() && | 547 if (IsGpuAvailable() && |
548 GPUTestBotConfig::CurrentConfigMatches("MAC AMD")) | 548 gpu::GPUTestBotConfig::CurrentConfigMatches("MAC AMD")) |
549 return; | 549 return; |
550 RunTest("canvas2d_balls_draw_from_canvas", kNone); | 550 RunTest("canvas2d_balls_draw_from_canvas", kNone); |
551 } | 551 } |
552 | 552 |
553 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasToCanvasDrawGPU) { | 553 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasToCanvasDrawGPU) { |
554 if (IsGpuAvailable() && | 554 if (IsGpuAvailable() && |
555 GPUTestBotConfig::CurrentConfigMatches("MAC AMD")) | 555 gpu::GPUTestBotConfig::CurrentConfigMatches("MAC AMD")) |
556 return; | 556 return; |
557 RunTest("canvas2d_balls_draw_from_canvas", kNone | kIsGpuCanvasTest); | 557 RunTest("canvas2d_balls_draw_from_canvas", kNone | kIsGpuCanvasTest); |
558 } | 558 } |
559 | 559 |
560 IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasTextSW) { | 560 IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasTextSW) { |
561 if (IsGpuAvailable() && | 561 if (IsGpuAvailable() && |
562 GPUTestBotConfig::CurrentConfigMatches("MAC AMD")) | 562 gpu::GPUTestBotConfig::CurrentConfigMatches("MAC AMD")) |
563 return; | 563 return; |
564 RunTest("canvas2d_balls_text", kNone); | 564 RunTest("canvas2d_balls_text", kNone); |
565 } | 565 } |
566 | 566 |
567 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasTextGPU) { | 567 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasTextGPU) { |
568 RunTest("canvas2d_balls_text", kNone | kIsGpuCanvasTest); | 568 RunTest("canvas2d_balls_text", kNone | kIsGpuCanvasTest); |
569 } | 569 } |
570 | 570 |
571 IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasFillPathSW) { | 571 IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasFillPathSW) { |
572 RunTest("canvas2d_balls_fill_path", kNone); | 572 RunTest("canvas2d_balls_fill_path", kNone); |
573 } | 573 } |
574 | 574 |
575 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasFillPathGPU) { | 575 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasFillPathGPU) { |
576 RunTest("canvas2d_balls_fill_path", kNone | kIsGpuCanvasTest); | 576 RunTest("canvas2d_balls_fill_path", kNone | kIsGpuCanvasTest); |
577 } | 577 } |
578 | 578 |
579 IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasSingleImageSW) { | 579 IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasSingleImageSW) { |
580 RunCanvasBenchTest("single_image", kNone); | 580 RunCanvasBenchTest("single_image", kNone); |
581 } | 581 } |
582 | 582 |
583 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasSingleImageGPU) { | 583 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasSingleImageGPU) { |
584 if (IsGpuAvailable() && | 584 if (IsGpuAvailable() && |
585 GPUTestBotConfig::CurrentConfigMatches("MAC AMD")) | 585 gpu::GPUTestBotConfig::CurrentConfigMatches("MAC AMD")) |
586 return; | 586 return; |
587 RunCanvasBenchTest("single_image", kNone | kIsGpuCanvasTest); | 587 RunCanvasBenchTest("single_image", kNone | kIsGpuCanvasTest); |
588 } | 588 } |
589 | 589 |
590 IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasManyImagesSW) { | 590 IN_PROC_BROWSER_TEST_F(ThroughputTestSW, CanvasManyImagesSW) { |
591 RunCanvasBenchTest("many_images", kNone); | 591 RunCanvasBenchTest("many_images", kNone); |
592 } | 592 } |
593 | 593 |
594 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasManyImagesGPU) { | 594 IN_PROC_BROWSER_TEST_F(ThroughputTestGPU, CanvasManyImagesGPU) { |
595 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); | 595 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); |
596 } | 596 } |
597 | 597 |
598 IN_PROC_BROWSER_TEST_F(ThroughputTestThread, CanvasManyImagesGPU) { | 598 IN_PROC_BROWSER_TEST_F(ThroughputTestThread, CanvasManyImagesGPU) { |
599 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); | 599 RunCanvasBenchTest("many_images", kNone | kIsGpuCanvasTest); |
600 } | 600 } |
601 | 601 |
602 } // namespace | 602 } // namespace |
OLD | NEW |