mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1758865 - Add Feature::VIDEO_OVERLAY r=gfx-reviewers,lsalzman
With Feature::VIDEO_OVERLAY, we could know if video overlay is enabled from about:support. Differential Revision: https://phabricator.services.mozilla.com/D140706
This commit is contained in:
parent
8df33a3b36
commit
c7c684492c
@ -40,6 +40,7 @@ namespace gfx {
|
||||
_(DMABUF, Feature, "DMABUF") \
|
||||
_(WINDOW_OCCLUSION, Feature, "WINDOW_OCCLUSION") \
|
||||
_(VAAPI, Feature, "VA-API video decoding") \
|
||||
_(VIDEO_OVERLAY, Feature, "video overlay") \
|
||||
/* Add new entries above this comment */
|
||||
|
||||
enum class Feature : uint32_t {
|
||||
|
@ -2654,13 +2654,22 @@ void gfxPlatform::InitWebRenderConfig() {
|
||||
if (StaticPrefs::gfx_webrender_software_d3d11_AtStartup()) {
|
||||
gfxVars::SetAllowSoftwareWebRenderD3D11(true);
|
||||
}
|
||||
|
||||
bool useVideoOverlay = false;
|
||||
if (StaticPrefs::gfx_webrender_dcomp_video_overlay_win_AtStartup()) {
|
||||
if (IsWin10AnniversaryUpdateOrLater() &&
|
||||
gfxConfig::IsEnabled(Feature::WEBRENDER_COMPOSITOR)) {
|
||||
MOZ_ASSERT(gfxConfig::IsEnabled(Feature::WEBRENDER_DCOMP_PRESENT));
|
||||
gfxVars::SetUseWebRenderDCompVideoOverlayWin(true);
|
||||
useVideoOverlay = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (useVideoOverlay) {
|
||||
FeatureState& feature = gfxConfig::GetFeature(Feature::VIDEO_OVERLAY);
|
||||
feature.EnableByDefault();
|
||||
gfxVars::SetUseWebRenderDCompVideoOverlayWin(true);
|
||||
}
|
||||
|
||||
if (Preferences::GetBool("gfx.webrender.flip-sequential", false)) {
|
||||
if (UseWebRender() && gfxVars::UseWebRenderANGLE()) {
|
||||
gfxVars::SetUseWebRenderFlipSequentialWin(true);
|
||||
|
Loading…
Reference in New Issue
Block a user