зеркало из https://github.com/mozilla/pjs.git
Bug 575962 - top window accelerated ENV variable. r=roc
--HG-- extra : rebase_source : 53f4400af98bcf06d0c01a13edc814a50f571435
This commit is contained in:
Родитель
d7cb16f9a4
Коммит
f3a6b16638
|
@ -96,6 +96,8 @@
|
|||
|
||||
#include "nsWebShellWindow.h" // get rid of this one, too...
|
||||
|
||||
#include "prenv.h"
|
||||
|
||||
#define SIZEMODE_NORMAL NS_LITERAL_STRING("normal")
|
||||
#define SIZEMODE_MAXIMIZED NS_LITERAL_STRING("maximized")
|
||||
#define SIZEMODE_MINIMIZED NS_LITERAL_STRING("minimized")
|
||||
|
@ -1387,7 +1389,13 @@ void nsXULWindow::SyncAttributesToWidget()
|
|||
|
||||
// "accelerated" attribute
|
||||
PRBool isAccelerated;
|
||||
rv = windowElement->HasAttribute(NS_LITERAL_STRING("accelerated"), &isAccelerated);
|
||||
static const char *acceleratedEnv = PR_GetEnv("MOZ_ACCELERATED");
|
||||
if (acceleratedEnv && *acceleratedEnv) {
|
||||
isAccelerated = *acceleratedEnv != '0';
|
||||
rv = NS_OK;
|
||||
} else
|
||||
rv = windowElement->HasAttribute(NS_LITERAL_STRING("accelerated"), &isAccelerated);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mWindow->SetAcceleratedRendering(isAccelerated);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче