diff --git a/gfx/layers/composite/CompositableHost.h b/gfx/layers/composite/CompositableHost.h index cf4d845526f8..c959f5004c34 100644 --- a/gfx/layers/composite/CompositableHost.h +++ b/gfx/layers/composite/CompositableHost.h @@ -39,11 +39,13 @@ namespace layers { class Layer; class LayerComposite; +class ImageHost; class Compositor; class ThebesBufferData; class TiledContentHost; class CompositableParentManager; class WebRenderImageHost; +class ContentHostTexture; struct EffectChain; struct ImageCompositeNotificationInfo { @@ -146,6 +148,8 @@ public: Layer* GetLayer() const { return mLayer; } void SetLayer(Layer* aLayer) { mLayer = aLayer; } + virtual ContentHostTexture* AsContentHostTexture() { return nullptr; } + virtual ImageHost* AsImageHost() { return nullptr; } virtual TiledContentHost* AsTiledContentHost() { return nullptr; } virtual WebRenderImageHost* AsWebRenderImageHost() { return nullptr; } diff --git a/gfx/layers/composite/ContentHost.h b/gfx/layers/composite/ContentHost.h index d94346827c20..9557c6359058 100644 --- a/gfx/layers/composite/ContentHost.h +++ b/gfx/layers/composite/ContentHost.h @@ -177,6 +177,8 @@ public: mLocked = false; } + ContentHostTexture* AsContentHostTexture() override { return this; } + virtual already_AddRefed GenEffect(const gfx::SamplingFilter aSamplingFilter) override; protected: diff --git a/gfx/layers/composite/ImageHost.h b/gfx/layers/composite/ImageHost.h index 77dcb0b484ca..8b3e87174092 100644 --- a/gfx/layers/composite/ImageHost.h +++ b/gfx/layers/composite/ImageHost.h @@ -44,6 +44,7 @@ public: ~ImageHost(); virtual CompositableType GetType() override { return mTextureInfo.mCompositableType; } + virtual ImageHost* AsImageHost() override { return this; } virtual void Composite(Compositor* aCompositor, LayerComposite* aLayer,