Skip to content

Commit

Permalink
Bug 1666455. Enable WebRender on higher refresh rates on non Intel. r…
Browse files Browse the repository at this point in the history
…=aosmond

Differential Revision: https://phabricator.services.mozilla.com/D92615
  • Loading branch information
jrmuizel committed Oct 6, 2020
1 parent 0cdf64b commit 7b09b73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 5 additions & 4 deletions gfx/config/gfxConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,15 @@ bool gfxConfigManager::ConfigureWebRenderQualified() {
"Battery Intel requires os compositor",
"INTEL_BATTERY_REQUIRES_DCOMP"_ns);
}
}

int32_t maxRefreshRate = mGfxInfo->GetMaxRefreshRate();
if (maxRefreshRate > 60) {
mFeatureWrQualified->Disable(FeatureStatus::Blocked,
int32_t maxRefreshRate = mGfxInfo->GetMaxRefreshRate();
if (maxRefreshRate > 60) {
mFeatureWrQualified->Disable(FeatureStatus::Blocked,
"Monitor refresh rate too high",
"REFRESH_RATE_TOO_HIGH"_ns);
}
}

}

return guarded;
Expand Down
2 changes: 2 additions & 0 deletions gfx/tests/gtest/TestConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,7 @@ TEST_F(GfxConfigManager, WebRenderHighRefreshRateNightly) {
TEST_F(GfxConfigManager, WebRenderHighRefreshRateNotNightly) {
mIsNightly = false;
mMockGfxInfo->mMaxRefreshRate = 120;
mMockGfxInfo->mVendorId = "0x8086";
ConfigureWebRender();

EXPECT_FALSE(mFeatures.mWrQualified.IsEnabled());
Expand All @@ -684,6 +685,7 @@ TEST_F(GfxConfigManager, WebRenderHighRefreshRateNotNightly) {
TEST_F(GfxConfigManager, WebRenderAtRefreshRateThreshold) {
mIsNightly = false;
mMockGfxInfo->mMaxRefreshRate = 60;
mMockGfxInfo->mVendorId = "0x8086";
ConfigureWebRender();

EXPECT_TRUE(mFeatures.mWrQualified.IsEnabled());
Expand Down

0 comments on commit 7b09b73

Please sign in to comment.