author | Joe Drew <joe@drew.ca> |
Thu, 03 Feb 2011 16:12:33 -0500 | |
changeset 61876 | 0ab68a939a4561e0674b9217ec5fae74c595c9a2 |
parent 61875 | 41258e566f2e5ccb14cee2c645635d9f811cc522 |
child 61877 | c6993d965d0a373f8e0f1545e3144c761131728d |
push id | 18529 |
push user | jdrew@mozilla.com |
push date | Thu, 03 Feb 2011 21:18:25 +0000 |
treeherder | autoland@b22b865abf30 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jrmuizel, josh, b |
bugs | 629016 |
milestone | 2.0b12pre |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/widget/src/xpwidgets/nsBaseWidget.cpp +++ b/widget/src/xpwidgets/nsBaseWidget.cpp @@ -788,16 +788,34 @@ nsBaseWidget::GetShouldAccelerate() PRBool forceAcceleration = PR_FALSE; #if defined(XP_WIN) || defined(ANDROID) || (MOZ_PLATFORM_MAEMO > 5) PRBool accelerateByDefault = PR_TRUE; #elif defined(XP_MACOSX) /* quickdraw plugins don't work with OpenGL so we need to avoid OpenGL when we want to support * them. e.g. 10.5 */ # if defined(NP_NO_QUICKDRAW) PRBool accelerateByDefault = PR_TRUE; + + // 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 = PR_FALSE; + } + } + } + # else PRBool accelerateByDefault = PR_FALSE; # endif #else PRBool accelerateByDefault = PR_FALSE; #endif