mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 863043: Move CompositorOGL::Initialize's helper-nsRunnable from function-scope to class-scope to fix build warning about ignored visibility attribute. r=Bas
This commit is contained in:
parent
80f5568437
commit
ba839937c0
@ -311,6 +311,16 @@ CompositorOGL::CleanupResources()
|
|||||||
mGLContext = nullptr;
|
mGLContext = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Impl of a a helper-runnable's "Run" method, used in Initialize()
|
||||||
|
NS_IMETHODIMP
|
||||||
|
CompositorOGL::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
|
bool
|
||||||
CompositorOGL::Initialize()
|
CompositorOGL::Initialize()
|
||||||
{
|
{
|
||||||
@ -481,19 +491,11 @@ CompositorOGL::Initialize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (NS_IsMainThread()) {
|
if (NS_IsMainThread()) {
|
||||||
|
// NOTE: This must match the code in ReadDrawFPSPref::Run().
|
||||||
Preferences::AddBoolVarCache(&sDrawFPS, "layers.acceleration.draw-fps");
|
Preferences::AddBoolVarCache(&sDrawFPS, "layers.acceleration.draw-fps");
|
||||||
Preferences::AddBoolVarCache(&sFrameCounter, "layers.acceleration.frame-counter");
|
Preferences::AddBoolVarCache(&sFrameCounter, "layers.acceleration.frame-counter");
|
||||||
} else {
|
} else {
|
||||||
// We have to dispatch an event to the main thread to read the pref.
|
// 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());
|
NS_DispatchToMainThread(new ReadDrawFPSPref());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,6 +141,12 @@ private:
|
|||||||
/** The size of the surface we are rendering to */
|
/** The size of the surface we are rendering to */
|
||||||
nsIntSize mSurfaceSize;
|
nsIntSize mSurfaceSize;
|
||||||
|
|
||||||
|
/** Helper-class used by Initialize **/
|
||||||
|
class ReadDrawFPSPref MOZ_FINAL : public nsRunnable {
|
||||||
|
public:
|
||||||
|
NS_IMETHOD Run() MOZ_OVERRIDE;
|
||||||
|
};
|
||||||
|
|
||||||
already_AddRefed<mozilla::gl::GLContext> CreateContext();
|
already_AddRefed<mozilla::gl::GLContext> CreateContext();
|
||||||
|
|
||||||
/** Shader Programs */
|
/** Shader Programs */
|
||||||
|
Loading…
Reference in New Issue
Block a user