Bug 1280827 - Remove some obsolete OS X version checks in gfx/. r=jrmuizel.

This commit is contained in:
2016-07-10 13:11:33 +02:00
parent 726c68bbf9
commit e7d6c78a32
7 changed files with 4 additions and 67 deletions

View File

@@ -1017,15 +1017,9 @@ GLContext::InitWithPrefixImpl(const char* prefix, bool trygl)
mMaxRenderbufferSize = std::min(mMaxRenderbufferSize, 4096);
mNeedsTextureSizeChecks = true;
} else if (mVendor == GLVendor::NVIDIA) {
if (nsCocoaFeatures::OnMountainLionOrLater()) {
// See bug 879656. 8192 fails, 8191 works.
mMaxTextureSize = std::min(mMaxTextureSize, 8191);
mMaxRenderbufferSize = std::min(mMaxRenderbufferSize, 8191);
} else {
// See bug 877949.
mMaxTextureSize = std::min(mMaxTextureSize, 4096);
mMaxRenderbufferSize = std::min(mMaxRenderbufferSize, 4096);
}
// See bug 879656. 8192 fails, 8191 works.
mMaxTextureSize = std::min(mMaxTextureSize, 8191);
mMaxRenderbufferSize = std::min(mMaxRenderbufferSize, 8191);
// Part of the bug 879656, but it also doesn't hurt the 877949
mNeedsTextureSizeChecks = true;

View File

@@ -6,10 +6,6 @@
#include "GLContext.h"
#include "nsPrintfCString.h"
#ifdef XP_MACOSX
#include "nsCocoaFeatures.h"
#endif
namespace mozilla {
namespace gl {
@@ -885,16 +881,6 @@ GLContext::InitFeatures()
GetFeatureName(feature));
}
}
if (WorkAroundDriverBugs()) {
#ifdef XP_MACOSX
// MacOSX 10.6 reports to support EXT_framebuffer_sRGB and EXT_texture_sRGB but
// fails to convert from sRGB to linear when reading from an sRGB texture attached
// to an FBO. (bug 843668)
if (!nsCocoaFeatures::OnLionOrLater())
MarkUnsupported(GLFeature::sRGB_framebuffer);
#endif // XP_MACOSX
}
}
void

View File

@@ -46,10 +46,6 @@
#include "TexturePoolOGL.h"
#endif
#ifdef XP_MACOSX
#include "nsCocoaFeatures.h"
#endif
#include "GeckoProfiler.h"
namespace mozilla {
@@ -1439,21 +1435,6 @@ CompositorOGL::DrawQuad(const Rect& aRect,
// Pass 2.
gl()->fBlendFuncSeparate(LOCAL_GL_ONE, LOCAL_GL_ONE,
LOCAL_GL_ONE, LOCAL_GL_ONE);
#ifdef XP_MACOSX
if (gl()->WorkAroundDriverBugs() &&
gl()->Vendor() == GLVendor::NVIDIA &&
!nsCocoaFeatures::OnMavericksOrLater()) {
// Bug 987497: With some GPUs the nvidia driver on 10.8 and below
// won't pick up the TexturePass2 uniform change below if we don't do
// something to force it. Re-activating the shader seems to be one way
// of achieving that.
GLint program;
mGLContext->fGetIntegerv(LOCAL_GL_CURRENT_PROGRAM, &program);
mGLContext->fUseProgram(program);
}
#endif
program->SetTexturePass2(true);
BindAndDrawQuadWithTextureRect(program,
aRect,

View File

@@ -38,10 +38,6 @@
#include "gfxMathTable.h"
#include "gfx2DGlue.h"
#if defined(XP_MACOSX)
#include "nsCocoaFeatures.h"
#endif
#include "cairo.h"
#include "harfbuzz/hb.h"
@@ -1775,13 +1771,6 @@ gfxFontFamily::ReadFaceNames(gfxPlatformFontList *aPlatformFontList,
bool asyncFontLoaderDisabled = false;
#if defined(XP_MACOSX)
// bug 975460 - async font loader crashes sometimes under 10.6, disable
if (!nsCocoaFeatures::OnLionOrLater()) {
asyncFontLoaderDisabled = true;
}
#endif
if (!mOtherFamilyNamesInitialized &&
aFontInfoData &&
aFontInfoData->mLoadOtherNames &&

View File

@@ -1206,10 +1206,7 @@ public:
virtual void Load() {
nsAutoreleasePool localPool;
// bug 975460 - async font loader crashes sometimes under 10.6, disable
if (nsCocoaFeatures::OnLionOrLater()) {
FontInfoData::Load();
}
FontInfoData::Load();
}
// loads font data for all members of a given family

View File

@@ -24,7 +24,6 @@
#include <dlfcn.h>
#include <CoreVideo/CoreVideo.h>
#include "nsCocoaFeatures.h"
#include "mozilla/layers/CompositorBridgeParent.h"
#include "VsyncSource.h"
@@ -369,14 +368,6 @@ gfxPlatformMac::ReadAntiAliasingThreshold()
return threshold;
}
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()
{

View File

@@ -76,7 +76,6 @@ public:
return true;
}
virtual bool UseProgressivePaint() override;
virtual already_AddRefed<mozilla::gfx::VsyncSource> CreateHardwareVsyncSource() override;
// lower threshold on font anti-aliasing