bug 907946 - re-enable EXT_packed_depth_stencil on OS X 10.9 - r=bjacob,jgilbert

This commit is contained in:
Guillaume Abadie 2013-08-22 20:13:59 -04:00
parent 2c25ab3df4
commit 9edea3a246
3 changed files with 15 additions and 1 deletions

View File

@ -28,6 +28,10 @@
#include <CoreServices/CoreServices.h> #include <CoreServices/CoreServices.h>
#endif #endif
#if defined(MOZ_WIDGET_COCOA)
#include "nsCocoaFeatures.h"
#endif
using namespace mozilla::gfx; using namespace mozilla::gfx;
namespace mozilla { namespace mozilla {
@ -911,8 +915,10 @@ GLContext::InitExtensions()
#ifdef XP_MACOSX #ifdef XP_MACOSX
// The Mac Nvidia driver, for versions up to and including 10.8, don't seem // The Mac Nvidia driver, for versions up to and including 10.8, don't seem
// to properly support this. See 814839 // to properly support this. See 814839
// this has been fixed in Mac OS X 10.9. See 907946
if (WorkAroundDriverBugs() && if (WorkAroundDriverBugs() &&
Vendor() == gl::GLContext::VendorNVIDIA) Vendor() == gl::GLContext::VendorNVIDIA &&
!nsCocoaFeatures::OnMavericksOrLater())
{ {
MarkExtensionUnsupported(gl::GLContext::EXT_packed_depth_stencil); MarkExtensionUnsupported(gl::GLContext::EXT_packed_depth_stencil);
} }

View File

@ -14,6 +14,7 @@ public:
static bool OnLionOrLater(); static bool OnLionOrLater();
static bool OnMountainLionOrLater(); static bool OnMountainLionOrLater();
static bool SupportCoreAnimationPlugins(); static bool SupportCoreAnimationPlugins();
static bool OnMavericksOrLater();
private: private:
static int32_t mOSXVersion; static int32_t mOSXVersion;

View File

@ -7,6 +7,7 @@
#define MAC_OS_X_VERSION_10_6_HEX 0x00001060 #define MAC_OS_X_VERSION_10_6_HEX 0x00001060
#define MAC_OS_X_VERSION_10_7_HEX 0x00001070 #define MAC_OS_X_VERSION_10_7_HEX 0x00001070
#define MAC_OS_X_VERSION_10_8_HEX 0x00001080 #define MAC_OS_X_VERSION_10_8_HEX 0x00001080
#define MAC_OS_X_VERSION_10_9_HEX 0x00001090
// This API will not work for OS X 10.10, see Gestalt.h. // This API will not work for OS X 10.10, see Gestalt.h.
@ -86,3 +87,9 @@ nsCocoaFeatures::OnMountainLionOrLater()
{ {
return (OSXVersion() >= MAC_OS_X_VERSION_10_8_HEX); return (OSXVersion() >= MAC_OS_X_VERSION_10_8_HEX);
} }
/* static */ bool
nsCocoaFeatures::OnMavericksOrLater()
{
return (OSXVersion() >= MAC_OS_X_VERSION_10_9_HEX);
}