Expose ContentTextureHost buffer properties. (bug 1365879 part 4, r=mattwoodrow)

This commit is contained in:
David Anderson 2017-06-20 01:17:16 -07:00
Родитель f52c24e301
Коммит f56c8518c4
1 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -63,6 +63,11 @@ public:
// tiles are fading in.
virtual void AddAnimationInvalidation(nsIntRegion& aRegion) { }
virtual gfx::IntRect GetBufferRect() {
MOZ_ASSERT_UNREACHABLE("Must be implemented in derived class");
return gfx::IntRect();
}
protected:
explicit ContentHost(const TextureInfo& aTextureInfo)
: CompositableHost(aTextureInfo)
@ -92,13 +97,19 @@ public:
explicit ContentHostBase(const TextureInfo& aTextureInfo);
virtual ~ContentHostBase();
protected:
virtual gfx::IntRect GetBufferRect() override { return mBufferRect; }
virtual nsIntPoint GetOriginOffset()
{
return mBufferRect.TopLeft() - mBufferRotation;
}
gfx::IntPoint GetBufferRotation()
{
return mBufferRotation.ToUnknownPoint();
}
protected:
gfx::IntRect mBufferRect;
nsIntPoint mBufferRotation;
bool mInitialised;