Bug 829710 - Restore hardware-accleration check for 10.6.x, x <= 2, mistakenly removed in bug 598401. r=BenWa

This commit is contained in:
Joe Drew 2013-01-11 22:59:48 -05:00
parent fcf02cc8dc
commit 7cd0ffe2a8

View File

@ -777,6 +777,25 @@ nsBaseWidget::ComputeShouldAccelerate(bool aDefault)
bool accelerateByDefault = false;
#endif
#ifdef XP_MACOSX
// 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.
SInt32 major, minor, bugfix;
OSErr err1 = ::Gestalt(gestaltSystemVersionMajor, &major);
OSErr err2 = ::Gestalt(gestaltSystemVersionMinor, &minor);
OSErr err3 = ::Gestalt(gestaltSystemVersionBugFix, &bugfix);
if (err1 == noErr && err2 == noErr && err3 == noErr) {
if (major == 10 && minor == 6) {
if (bugfix <= 2) {
accelerateByDefault = false;
}
}
}
#endif
// We don't want to accelerate small popup windows like menu, but we still
// want to accelerate xul panels that may contain arbitrarily complex content.
bool isSmallPopup = ((mWindowType == eWindowType_popup) &&