Bug 973227 - Add GetBackendType to every Compositor class. r=nical

This commit is contained in:
Tom Schuster 2014-02-18 01:30:05 +01:00
parent 0e922aada3
commit a79164e45e
5 changed files with 17 additions and 0 deletions

View File

@ -389,6 +389,7 @@ public:
virtual const char* Name() const = 0;
#endif // MOZ_DUMP_PAINTING
virtual LayersBackend GetBackendType() const = 0;
/**
* Each Compositor has a unique ID.

View File

@ -116,6 +116,10 @@ public:
virtual const char* Name() const { return "Basic"; }
virtual LayersBackend GetBackendType() const MOZ_OVERRIDE {
return LayersBackend::LAYERS_BASIC;
}
virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; }
gfx::DrawTarget *GetDrawTarget() { return mDrawTarget; }

View File

@ -136,6 +136,10 @@ public:
virtual const char* Name() const MOZ_OVERRIDE { return "Direct3D 11"; }
#endif
virtual LayersBackend GetBackendType() const MOZ_OVERRIDE {
return LayersBackend::LAYERS_D3D11;
}
virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; }
ID3D11Device* GetDevice() { return mDevice; }

View File

@ -83,6 +83,10 @@ public:
virtual const char* Name() const MOZ_OVERRIDE { return "Direct3D9"; }
#endif
virtual LayersBackend GetBackendType() const MOZ_OVERRIDE {
return LayersBackend::LAYERS_D3D9;
}
virtual nsIWidget* GetWidget() const MOZ_OVERRIDE { return mWidget; }
IDirect3DDevice9* device() const

View File

@ -150,6 +150,10 @@ public:
virtual const char* Name() const MOZ_OVERRIDE { return "OGL"; }
#endif // MOZ_DUMP_PAINTING
virtual LayersBackend GetBackendType() const MOZ_OVERRIDE {
return LayersBackend::LAYERS_OPENGL;
}
virtual void Pause() MOZ_OVERRIDE;
virtual bool Resume() MOZ_OVERRIDE;