Bug 1310222 - Remove GL max-size reduction workarounds on OSX >=10.12 - r=daoshengmu draft
authorJeff Gilbert <jgilbert@mozilla.com>
Mon, 08 May 2017 19:23:34 -0700
changeset 574550 7a8f075d67dae6e2217b9d0b34e47e6b73ec2be9
parent 574549 a6793829a20adb633bf054da18bedb4c14f3de2f
child 627635 5155cf73954bd6c1844e1bd8cfd5d77418ed2390
push id57749
push userbmo:jgilbert@mozilla.com
push dateTue, 09 May 2017 02:24:44 +0000
reviewersdaoshengmu
bugs1310222
milestone55.0a1
Bug 1310222 - Remove GL max-size reduction workarounds on OSX >=10.12 - r=daoshengmu MozReview-Commit-ID: 7CmPNMB9PUM
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -861,17 +861,20 @@ GLContext::InitWithPrefixImpl(const char
     raw_fGetIntegerv(LOCAL_GL_VIEWPORT, mViewportRect);
     raw_fGetIntegerv(LOCAL_GL_SCISSOR_BOX, mScissorRect);
     raw_fGetIntegerv(LOCAL_GL_MAX_TEXTURE_SIZE, &mMaxTextureSize);
     raw_fGetIntegerv(LOCAL_GL_MAX_CUBE_MAP_TEXTURE_SIZE, &mMaxCubeMapTextureSize);
     raw_fGetIntegerv(LOCAL_GL_MAX_RENDERBUFFER_SIZE, &mMaxRenderbufferSize);
     raw_fGetIntegerv(LOCAL_GL_MAX_VIEWPORT_DIMS, mMaxViewportDims);
 
 #ifdef XP_MACOSX
-    if (mWorkAroundDriverBugs) {
+    if (mWorkAroundDriverBugs &&
+        nsCocoaFeatures::OSXVersionMajor() == 10 &&
+        nsCocoaFeatures::OSXVersionMinor() < 12)
+    {
         if (mVendor == GLVendor::Intel) {
             // see bug 737182 for 2D textures, bug 684882 for cube map textures.
             mMaxTextureSize        = std::min(mMaxTextureSize,        4096);
             mMaxCubeMapTextureSize = std::min(mMaxCubeMapTextureSize, 512);
             // for good measure, we align renderbuffers on what we do for 2D textures
             mMaxRenderbufferSize   = std::min(mMaxRenderbufferSize,   4096);
             mNeedsTextureSizeChecks = true;
         } else if (mVendor == GLVendor::NVIDIA) {