mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 623446. Fix force-enabling layer acceleration on non-Windows. r=joe,a=b
--HG-- extra : rebase_source : 0ee05e18c71dcb83437b9b27133c73ec290d22cd
This commit is contained in:
parent
dd52241c9a
commit
3907cceab1
@ -783,6 +783,7 @@ nsBaseWidget::GetShouldAccelerate()
|
||||
nsCOMPtr<nsIPrefBranch2> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
|
||||
PRBool disableAcceleration = PR_FALSE;
|
||||
PRBool forceAcceleration = PR_FALSE;
|
||||
#if defined(XP_WIN) || defined(XP_MACOSX)
|
||||
PRBool accelerateByDefault = PR_TRUE;
|
||||
#else
|
||||
@ -793,6 +794,10 @@ nsBaseWidget::GetShouldAccelerate()
|
||||
// we should use AddBoolPrefVarCache
|
||||
prefs->GetBoolPref("layers.acceleration.disabled",
|
||||
&disableAcceleration);
|
||||
|
||||
prefs->GetBoolPref("layers.acceleration.force-enabled",
|
||||
&forceAcceleration);
|
||||
|
||||
}
|
||||
|
||||
const char *acceleratedEnv = PR_GetEnv("MOZ_ACCELERATED");
|
||||
@ -807,7 +812,7 @@ nsBaseWidget::GetShouldAccelerate()
|
||||
if (disableAcceleration || safeMode)
|
||||
return PR_FALSE;
|
||||
|
||||
if (accelerateByDefault)
|
||||
if (accelerateByDefault || forceAcceleration)
|
||||
return PR_TRUE;
|
||||
|
||||
/* use the window acceleration flag */
|
||||
|
Loading…
Reference in New Issue
Block a user