зеркало из 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 Layer;
|
||||||
class LayerComposite;
|
class LayerComposite;
|
||||||
|
class ImageHost;
|
||||||
class Compositor;
|
class Compositor;
|
||||||
class ThebesBufferData;
|
class ThebesBufferData;
|
||||||
class TiledContentHost;
|
class TiledContentHost;
|
||||||
class CompositableParentManager;
|
class CompositableParentManager;
|
||||||
class WebRenderImageHost;
|
class WebRenderImageHost;
|
||||||
|
class ContentHostTexture;
|
||||||
struct EffectChain;
|
struct EffectChain;
|
||||||
|
|
||||||
struct ImageCompositeNotificationInfo {
|
struct ImageCompositeNotificationInfo {
|
||||||
|
@ -146,6 +148,8 @@ public:
|
||||||
Layer* GetLayer() const { return mLayer; }
|
Layer* GetLayer() const { return mLayer; }
|
||||||
void SetLayer(Layer* aLayer) { mLayer = aLayer; }
|
void SetLayer(Layer* aLayer) { mLayer = aLayer; }
|
||||||
|
|
||||||
|
virtual ContentHostTexture* AsContentHostTexture() { return nullptr; }
|
||||||
|
virtual ImageHost* AsImageHost() { return nullptr; }
|
||||||
virtual TiledContentHost* AsTiledContentHost() { return nullptr; }
|
virtual TiledContentHost* AsTiledContentHost() { return nullptr; }
|
||||||
virtual WebRenderImageHost* AsWebRenderImageHost() { return nullptr; }
|
virtual WebRenderImageHost* AsWebRenderImageHost() { return nullptr; }
|
||||||
|
|
||||||
|
|
|
@ -177,6 +177,8 @@ public:
|
||||||
mLocked = false;
|
mLocked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ContentHostTexture* AsContentHostTexture() override { return this; }
|
||||||
|
|
||||||
virtual already_AddRefed<TexturedEffect> GenEffect(const gfx::SamplingFilter aSamplingFilter) override;
|
virtual already_AddRefed<TexturedEffect> GenEffect(const gfx::SamplingFilter aSamplingFilter) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -44,6 +44,7 @@ public:
|
||||||
~ImageHost();
|
~ImageHost();
|
||||||
|
|
||||||
virtual CompositableType GetType() override { return mTextureInfo.mCompositableType; }
|
virtual CompositableType GetType() override { return mTextureInfo.mCompositableType; }
|
||||||
|
virtual ImageHost* AsImageHost() override { return this; }
|
||||||
|
|
||||||
virtual void Composite(Compositor* aCompositor,
|
virtual void Composite(Compositor* aCompositor,
|
||||||
LayerComposite* aLayer,
|
LayerComposite* aLayer,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче