зеркало из https://github.com/mozilla/gecko-dev.git
Allow safe downcasting to ContentTextureHost and ImageHost. (bug 1365879 part 5, r=mattwoodrow)
This commit is contained in:
Родитель
f56c8518c4
Коммит
e9660f0e6c
|
@ -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; }
|
||||
|
||||
|
|
|
@ -177,6 +177,8 @@ public:
|
|||
mLocked = false;
|
||||
}
|
||||
|
||||
ContentHostTexture* AsContentHostTexture() override { return this; }
|
||||
|
||||
virtual already_AddRefed<TexturedEffect> GenEffect(const gfx::SamplingFilter aSamplingFilter) override;
|
||||
|
||||
protected:
|
||||
|
|
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче