Bug 1002857 - stop disabling GL layers for 10.6.2 and below. r=mstange draft
authorBenoit Girard <b56girard@gmail.com>
Fri, 20 May 2016 11:33:06 -0400
changeset 369161 57424262986cd1314eef73e35b1bb1c98ccb8931
parent 368491 86f6d432d11c26df83f06af650386bc28d77cc4b
child 521485 7855223f18d4dbcc6d42ebaf532fd0b4a6271bd6
push id18764
push userb56girard@gmail.com
push dateFri, 20 May 2016 15:33:24 +0000
reviewersmstange
bugs1002857
milestone49.0a1
Bug 1002857 - stop disabling GL layers for 10.6.2 and below. r=mstange MozReview-Commit-ID: 68utercZGHi
gfx/thebes/gfxPlatformMac.cpp
gfx/thebes/gfxPlatformMac.h
widget/cocoa/nsCocoaFeatures.h
widget/cocoa/nsCocoaFeatures.mm
--- a/gfx/thebes/gfxPlatformMac.cpp
+++ b/gfx/thebes/gfxPlatformMac.cpp
@@ -373,27 +373,16 @@ gfxPlatformMac::ReadAntiAliasingThreshol
 bool
 gfxPlatformMac::UseProgressivePaint()
 {
   // Progressive painting requires cross-process mutexes, which don't work so
   // well on OS X 10.6 so we disable there.
   return nsCocoaFeatures::OnLionOrLater() && gfxPlatform::UseProgressivePaint();
 }
 
-bool
-gfxPlatformMac::AccelerateLayersByDefault()
-{
-  // 10.6.2 and lower have a bug involving textures and pixel buffer objects
-  // that caused bug 629016, so we don't allow OpenGL-accelerated layers on
-  // those versions of the OS.
-  // This will still let full-screen video be accelerated on OpenGL, because
-  // that XUL widget opts in to acceleration, but that's probably OK.
-  return nsCocoaFeatures::AccelerateByDefault();
-}
-
 // This is the renderer output callback function, called on the vsync thread
 static CVReturn VsyncCallback(CVDisplayLinkRef aDisplayLink,
                               const CVTimeStamp* aNow,
                               const CVTimeStamp* aOutputTime,
                               CVOptionFlags aFlagsIn,
                               CVOptionFlags* aFlagsOut,
                               void* aDisplayLinkContext);
 
--- a/gfx/thebes/gfxPlatformMac.h
+++ b/gfx/thebes/gfxPlatformMac.h
@@ -77,19 +77,16 @@ public:
     }
 
     virtual bool UseProgressivePaint() override;
     virtual already_AddRefed<mozilla::gfx::VsyncSource> CreateHardwareVsyncSource() override;
 
     // lower threshold on font anti-aliasing
     uint32_t GetAntiAliasingThreshold() { return mFontAntiAliasingThreshold; }
 
-protected:
-    bool AccelerateLayersByDefault() override;
-
 private:
     virtual void GetPlatformCMSOutputProfile(void* &mem, size_t &size) override;
 
     // read in the pref value for the lower threshold on font anti-aliasing
     static uint32_t ReadAntiAliasingThreshold();
 
     uint32_t mFontAntiAliasingThreshold;
 };
--- a/widget/cocoa/nsCocoaFeatures.h
+++ b/widget/cocoa/nsCocoaFeatures.h
@@ -18,17 +18,16 @@ public:
   static int32_t OSXVersionMajor();
   static int32_t OSXVersionMinor();
   static int32_t OSXVersionBugFix();
   static bool OnLionOrLater();
   static bool OnMountainLionOrLater();
   static bool OnMavericksOrLater();
   static bool OnYosemiteOrLater();
   static bool OnElCapitanOrLater();
-  static bool AccelerateByDefault();
 
   static bool IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix=0);
 
   // These are utilities that do not change or depend on the value of mOSXVersion
   // and instead just encapsulate the encoding algorithm.  Note that GetVersion
   // actually adjusts to the lowest supported OS, so it will always return
   // a "supported" version.  GetSystemVersion does not make any modifications.
   static void GetSystemVersion(int &aMajor, int &aMinor, int &aBugFix);
--- a/widget/cocoa/nsCocoaFeatures.mm
+++ b/widget/cocoa/nsCocoaFeatures.mm
@@ -175,18 +175,12 @@ nsCocoaFeatures::OnYosemiteOrLater()
 
 /* static */ bool
 nsCocoaFeatures::OnElCapitanOrLater()
 {
     return (OSXVersion() >= MAC_OS_X_VERSION_10_11_HEX);
 }
 
 /* static */ bool
-nsCocoaFeatures::AccelerateByDefault()
-{
-    return IsAtLeastVersion(10, 6, 3);
-}
-
-/* static */ bool
 nsCocoaFeatures::IsAtLeastVersion(int32_t aMajor, int32_t aMinor, int32_t aBugFix)
 {
     return OSXVersion() >= GetVersion(aMajor, aMinor, aBugFix);
 }