Bug 904890 - Part 3: Add a layers API to expose the compositor backend. r=roc

This commit is contained in:
Matt Woodrow 2014-04-07 15:11:17 +12:00
parent 7e5407928d
commit 92503fda00
2 changed files with 11 additions and 0 deletions

View File

@ -419,6 +419,13 @@ public:
*/
virtual LayersBackend GetBackendType() = 0;
/**
* Type of layers backend that will be used to composite this layer tree.
* When compositing is done remotely, then this returns the layers type
* of the compositor.
*/
virtual LayersBackend GetCompositorBackendType() { return GetBackendType(); }
/**
* Creates a surface which is optimized for inter-operating with this layer
* manager.

View File

@ -60,6 +60,10 @@ public:
EndTransactionFlags aFlags = END_DEFAULT);
virtual LayersBackend GetBackendType() { return LayersBackend::LAYERS_CLIENT; }
virtual LayersBackend GetCompositorBackendType() MOZ_OVERRIDE
{
return AsShadowForwarder()->GetCompositorBackendType();
}
virtual void GetBackendName(nsAString& name);
virtual const char* Name() const { return "Client"; }