Commit e179c6a2 authored by Yuri Wiitala's avatar Yuri Wiitala Committed by Commit Bot

Remove novsync variants of performance_browser_tests.

Removes the "nosync" testing since this no longer applies to the new tab
capture impl (because it is necessarily triggered by OnBeginFrame's).
Also, added a call to BrowserTestBase::UseSoftwareCompositing() when the
non-GPU variants are run to ensure the GPU compositor is not being used.

TBR=xjz@chromium.org

Bug: 806400, 567848
Change-Id: I1d00a5f95ee6d3ac8caf0e5d1191c7bb03ca8064
Reviewed-on: https://chromium-review.googlesource.com/892049Reviewed-by: default avatarYuri Wiitala <miu@chromium.org>
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532654}
parent f7053a84
...@@ -68,13 +68,9 @@ constexpr size_t kTrimEvents = 24; // 1 sec at 24fps, or 0.4 sec at 60 fps. ...@@ -68,13 +68,9 @@ constexpr size_t kTrimEvents = 24; // 1 sec at 24fps, or 0.4 sec at 60 fps.
constexpr size_t kMinDataPoints = 100; // 1 sec of audio, or ~5 sec at 24fps. constexpr size_t kMinDataPoints = 100; // 1 sec of audio, or ~5 sec at 24fps.
enum TestFlags { enum TestFlags {
// TODO(miu): Remove kUseGpu (since the GPU is required), and maybe
// kDisableVsync. http://crbug.com/567848
kUseGpu = 1 << 0, // Only execute test if --enable-gpu was given kUseGpu = 1 << 0, // Only execute test if --enable-gpu was given
// on the command line. This is required for // on the command line. This is required for
// tests that run on GPU. // tests that run on GPU.
kDisableVsync = 1 << 1, // Do not limit framerate to vertical refresh.
// when on GPU, nor to 60hz when not on GPU.
kSmallWindow = 1 << 2, // Window size: 1 = 800x600, 0 = 2000x1000 kSmallWindow = 1 << 2, // Window size: 1 = 800x600, 0 = 2000x1000
k24fps = 1 << 3, // Use 24 fps video. k24fps = 1 << 3, // Use 24 fps video.
k30fps = 1 << 4, // Use 30 fps video. k30fps = 1 << 4, // Use 30 fps video.
...@@ -368,8 +364,6 @@ class CastV2PerformanceTest ...@@ -368,8 +364,6 @@ class CastV2PerformanceTest
std::string suffix; std::string suffix;
if (HasFlag(kUseGpu)) if (HasFlag(kUseGpu))
suffix += "_gpu"; suffix += "_gpu";
if (HasFlag(kDisableVsync))
suffix += "_novsync";
if (HasFlag(kSmallWindow)) if (HasFlag(kSmallWindow))
suffix += "_small"; suffix += "_small";
if (HasFlag(k24fps)) if (HasFlag(k24fps))
...@@ -406,6 +400,8 @@ class CastV2PerformanceTest ...@@ -406,6 +400,8 @@ class CastV2PerformanceTest
void SetUp() override { void SetUp() override {
EnablePixelOutput(); EnablePixelOutput();
if (!HasFlag(kUseGpu))
UseSoftwareCompositing();
ExtensionApiTest::SetUp(); ExtensionApiTest::SetUp();
} }
...@@ -425,12 +421,10 @@ class CastV2PerformanceTest ...@@ -425,12 +421,10 @@ class CastV2PerformanceTest
if (!HasFlag(kUseGpu)) if (!HasFlag(kUseGpu))
command_line->AppendSwitch(switches::kDisableGpu); command_line->AppendSwitch(switches::kDisableGpu);
if (HasFlag(kDisableVsync))
command_line->AppendSwitch(switches::kDisableGpuVsync);
command_line->AppendSwitchASCII( command_line->AppendSwitchASCII(
extensions::switches::kWhitelistedExtensionID, extensions::switches::kWhitelistedExtensionID,
kExtensionId); kExtensionId);
ExtensionApiTest::SetUpCommandLine(command_line); ExtensionApiTest::SetUpCommandLine(command_line);
} }
...@@ -721,7 +715,6 @@ INSTANTIATE_TEST_CASE_P( ...@@ -721,7 +715,6 @@ INSTANTIATE_TEST_CASE_P(
testing::Values(kUseGpu | k24fps, testing::Values(kUseGpu | k24fps,
kUseGpu | k30fps, kUseGpu | k30fps,
kUseGpu | k60fps, kUseGpu | k60fps,
kUseGpu | k24fps | kDisableVsync,
kUseGpu | k30fps | kProxyWifi, kUseGpu | k30fps | kProxyWifi,
kUseGpu | k30fps | kProxyBad, kUseGpu | k30fps | kProxyBad,
kUseGpu | k30fps | kSlowClock, kUseGpu | k30fps | kSlowClock,
......
...@@ -42,15 +42,9 @@ constexpr size_t kTrimEvents = 24; // 1 sec at 24fps, or 0.4 sec at 60 fps. ...@@ -42,15 +42,9 @@ constexpr size_t kTrimEvents = 24; // 1 sec at 24fps, or 0.4 sec at 60 fps.
constexpr size_t kMinDataPoints = 100; // ~5 sec at 24fps. constexpr size_t kMinDataPoints = 100; // ~5 sec at 24fps.
enum TestFlags { enum TestFlags {
// TODO(miu): Remove kUseGpu (since the GPU is required), kForceGpuComposited
// (because there's no longer a such thing as Chrome w/o a compositor), and
// maybe kDisableVsync. http://crbug.com/567848
kUseGpu = 1 << 0, // Only execute test if --enable-gpu was given kUseGpu = 1 << 0, // Only execute test if --enable-gpu was given
// on the command line. This is required for // on the command line. This is required for
// tests that run on GPU. // tests that run on GPU.
kForceGpuComposited = 1 << 1, // Force the test to use the compositor.
kDisableVsync = 1 << 2, // Do not limit framerate to vertical refresh.
// when on GPU, nor to 60hz when not on GPU.
kTestThroughWebRTC = 1 << 3, // Send video through a webrtc loopback. kTestThroughWebRTC = 1 << 3, // Send video through a webrtc loopback.
kSmallWindow = 1 << 4, // Window size: 1 = 800x600, 0 = 2000x1000 kSmallWindow = 1 << 4, // Window size: 1 = 800x600, 0 = 2000x1000
}; };
...@@ -71,12 +65,8 @@ class TabCapturePerformanceTest ...@@ -71,12 +65,8 @@ class TabCapturePerformanceTest
std::string GetSuffixForTestFlags() { std::string GetSuffixForTestFlags() {
std::string suffix; std::string suffix;
if (HasFlag(kForceGpuComposited))
suffix += "_comp";
if (HasFlag(kUseGpu)) if (HasFlag(kUseGpu))
suffix += "_gpu"; suffix += "_comp_gpu";
if (HasFlag(kDisableVsync))
suffix += "_novsync";
if (HasFlag(kTestThroughWebRTC)) if (HasFlag(kTestThroughWebRTC))
suffix += "_webrtc"; suffix += "_webrtc";
if (HasFlag(kSmallWindow)) if (HasFlag(kSmallWindow))
...@@ -86,6 +76,8 @@ class TabCapturePerformanceTest ...@@ -86,6 +76,8 @@ class TabCapturePerformanceTest
void SetUp() override { void SetUp() override {
EnablePixelOutput(); EnablePixelOutput();
if (!HasFlag(kUseGpu))
UseSoftwareCompositing();
ExtensionApiTest::SetUp(); ExtensionApiTest::SetUp();
} }
...@@ -105,12 +97,10 @@ class TabCapturePerformanceTest ...@@ -105,12 +97,10 @@ class TabCapturePerformanceTest
if (!HasFlag(kUseGpu)) if (!HasFlag(kUseGpu))
command_line->AppendSwitch(switches::kDisableGpu); command_line->AppendSwitch(switches::kDisableGpu);
if (HasFlag(kDisableVsync))
command_line->AppendSwitch(switches::kDisableGpuVsync);
command_line->AppendSwitchASCII( command_line->AppendSwitchASCII(
extensions::switches::kWhitelistedExtensionID, extensions::switches::kWhitelistedExtensionID,
kExtensionId); kExtensionId);
ExtensionApiTest::SetUpCommandLine(command_line); ExtensionApiTest::SetUpCommandLine(command_line);
} }
...@@ -258,9 +248,6 @@ class TabCapturePerformanceTest ...@@ -258,9 +248,6 @@ class TabCapturePerformanceTest
ASSERT_TRUE(tracing::BeginTracing("gpu,gpu.capture")); ASSERT_TRUE(tracing::BeginTracing("gpu,gpu.capture"));
std::string page = "performance.html"; std::string page = "performance.html";
page += HasFlag(kTestThroughWebRTC) ? "?WebRTC=1" : "?WebRTC=0"; page += HasFlag(kTestThroughWebRTC) ? "?WebRTC=1" : "?WebRTC=0";
// Ideally we'd like to run a higher capture rate when vsync is disabled,
// but libjingle currently doesn't allow that.
// page += HasFlag(kDisableVsync) ? "&fps=300" : "&fps=30";
page += "&fps=60"; page += "&fps=60";
ASSERT_TRUE(RunExtensionSubtest("tab_capture", page)) << message_; ASSERT_TRUE(RunExtensionSubtest("tab_capture", page)) << message_;
ASSERT_TRUE(tracing::EndTracing(&json_events)); ASSERT_TRUE(tracing::EndTracing(&json_events));
...@@ -303,15 +290,9 @@ IN_PROC_BROWSER_TEST_P(TabCapturePerformanceTest, Performance) { ...@@ -303,15 +290,9 @@ IN_PROC_BROWSER_TEST_P(TabCapturePerformanceTest, Performance) {
// Note: First argument is optional and intentionally left blank. // Note: First argument is optional and intentionally left blank.
// (it's a prefix for the generated test cases) // (it's a prefix for the generated test cases)
INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_CASE_P(,
, TabCapturePerformanceTest,
TabCapturePerformanceTest, testing::Values(0,
testing::Values( kUseGpu,
0, kTestThroughWebRTC,
kUseGpu | kForceGpuComposited, kTestThroughWebRTC | kUseGpu));
kDisableVsync,
kDisableVsync | kUseGpu | kForceGpuComposited,
kTestThroughWebRTC,
kTestThroughWebRTC | kUseGpu | kForceGpuComposited,
kTestThroughWebRTC | kDisableVsync,
kTestThroughWebRTC | kDisableVsync | kUseGpu | kForceGpuComposited));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment