From c2562b0917ebeca61a79b123eddb340be74af702 Mon Sep 17 00:00:00 2001 From: Brad Werth Date: Thu, 28 Oct 2021 22:47:10 +0000 Subject: [PATCH] Bug 1737998: Prevent macOS 10.12 from using specialized video layers. r=mstange Differential Revision: https://phabricator.services.mozilla.com/D129869 --- gfx/layers/NativeLayerCA.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gfx/layers/NativeLayerCA.mm b/gfx/layers/NativeLayerCA.mm index bfd3d9d497de..f2bcad50dd22 100644 --- a/gfx/layers/NativeLayerCA.mm +++ b/gfx/layers/NativeLayerCA.mm @@ -27,8 +27,8 @@ #include "mozilla/layers/SurfacePoolCA.h" #include "mozilla/StaticPrefs_gfx.h" #include "mozilla/webrender/RenderMacIOSurfaceTextureHost.h" +#include "nsCocoaFeatures.h" #include "ScopedGLHelpers.h" -#include "gfxUtils.h" @interface CALayer (PrivateSetContentsOpaque) - (void)setContentsOpaque:(BOOL)opaque; @@ -758,7 +758,8 @@ bool NativeLayerCA::IsVideoAndLocked(const MutexAutoLock& aProofOfLock) { } bool NativeLayerCA::ShouldSpecializeVideo(const MutexAutoLock& aProofOfLock) { - return StaticPrefs::gfx_core_animation_specialize_video() && mRootWindowIsFullscreen && + return StaticPrefs::gfx_core_animation_specialize_video() && + nsCocoaFeatures::OnHighSierraOrLater() && mRootWindowIsFullscreen && IsVideoAndLocked(aProofOfLock); } -- 2.11.4.GIT