зеркало из https://github.com/mozilla/gecko-dev.git
Expose ContentTextureHost buffer properties. (bug 1365879 part 4, r=mattwoodrow)
This commit is contained in:
Родитель
f52c24e301
Коммит
f56c8518c4
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче