mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 717958 - Always read FPS pref on the main thread with OMTC. r=ajuma
This commit is contained in:
parent
191929071f
commit
f9eaee1ae0
@ -367,7 +367,20 @@ LayerManagerOGL::Initialize(nsRefPtr<GLContext> aContext, bool force)
|
||||
console->LogStringMessage(msg.get());
|
||||
}
|
||||
|
||||
Preferences::AddBoolVarCache(&sDrawFPS, "layers.acceleration.draw-fps");
|
||||
if (NS_IsMainThread()) {
|
||||
Preferences::AddBoolVarCache(&sDrawFPS, "layers.acceleration.draw-fps");
|
||||
} else {
|
||||
// We have to dispatch an event to the main thread to read the pref.
|
||||
class ReadDrawFPSPref : public nsRunnable {
|
||||
public:
|
||||
NS_IMETHOD Run()
|
||||
{
|
||||
Preferences::AddBoolVarCache(&sDrawFPS, "layers.acceleration.draw-fps");
|
||||
return NS_OK;
|
||||
}
|
||||
};
|
||||
NS_DispatchToMainThread(new ReadDrawFPSPref());
|
||||
}
|
||||
|
||||
reporter.SetSuccessful();
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user