mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 09:01:16 +00:00
Bug 859517: Move LayerManagerOGL::Initialize's helper-nsRunnable from function-scope to class-scope to fix build warning about ignored visibility attribute. r=BenWa
This commit is contained in:
parent
471ef56d35
commit
a0a4661570
@ -486,6 +486,16 @@ LayerManagerOGL::AddPrograms(ShaderProgramType aType)
|
||||
}
|
||||
}
|
||||
|
||||
// Impl of a a helper-runnable's "Run" method, used in Initialize()
|
||||
NS_IMETHODIMP
|
||||
LayerManagerOGL::ReadDrawFPSPref::Run()
|
||||
{
|
||||
// NOTE: This must match the code in Initialize()'s NS_IsMainThread check.
|
||||
Preferences::AddBoolVarCache(&sDrawFPS, "layers.acceleration.draw-fps");
|
||||
Preferences::AddBoolVarCache(&sFrameCounter, "layers.acceleration.frame-counter");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
LayerManagerOGL::Initialize(nsRefPtr<GLContext> aContext, bool force)
|
||||
{
|
||||
@ -667,19 +677,11 @@ LayerManagerOGL::Initialize(nsRefPtr<GLContext> aContext, bool force)
|
||||
}
|
||||
|
||||
if (NS_IsMainThread()) {
|
||||
// NOTE: This must match the code in ReadDrawFPSPref::Run().
|
||||
Preferences::AddBoolVarCache(&sDrawFPS, "layers.acceleration.draw-fps");
|
||||
Preferences::AddBoolVarCache(&sFrameCounter, "layers.acceleration.frame-counter");
|
||||
} 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");
|
||||
Preferences::AddBoolVarCache(&sFrameCounter, "layers.acceleration.frame-counter");
|
||||
return NS_OK;
|
||||
}
|
||||
};
|
||||
NS_DispatchToMainThread(new ReadDrawFPSPref());
|
||||
}
|
||||
|
||||
|
@ -371,6 +371,12 @@ private:
|
||||
*/
|
||||
bool mIsRenderingToEGLSurface;
|
||||
|
||||
/** Helper-class used by Initialize **/
|
||||
class ReadDrawFPSPref MOZ_FINAL : public nsRunnable {
|
||||
public:
|
||||
NS_IMETHOD Run() MOZ_OVERRIDE;
|
||||
};
|
||||
|
||||
/** Current root layer. */
|
||||
LayerOGL *RootLayer() const;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user