mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 893301. Some rebasing fixes. r=nical
This commit is contained in:
parent
ee46d57bdc
commit
6b5c57b8c4
@ -291,6 +291,20 @@ ContentClientRemoteBuffer::SwapBuffers(const nsIntRegion& aFrontUpdatedRegion)
|
||||
mFrontAndBackBufferDiffer = true;
|
||||
}
|
||||
|
||||
void
|
||||
ContentClientRemoteBuffer::OnActorDestroy()
|
||||
{
|
||||
if (mTextureClient) {
|
||||
mTextureClient->OnActorDestroy();
|
||||
}
|
||||
if (mTextureClientOnWhite) {
|
||||
mTextureClientOnWhite->OnActorDestroy();
|
||||
}
|
||||
for (size_t i = 0; i < mOldTextures.Length(); ++i) {
|
||||
mOldTextures[i]->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
DeprecatedContentClientRemoteBuffer::DestroyBuffers()
|
||||
{
|
||||
@ -645,6 +659,26 @@ ContentClientDoubleBuffered::UpdateDestinationFrom(const RotatedBuffer& aSource,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ContentClientDoubleBuffered::OnActorDestroy()
|
||||
{
|
||||
if (mTextureClient) {
|
||||
mTextureClient->OnActorDestroy();
|
||||
}
|
||||
if (mTextureClientOnWhite) {
|
||||
mTextureClientOnWhite->OnActorDestroy();
|
||||
}
|
||||
for (size_t i = 0; i < mOldTextures.Length(); ++i) {
|
||||
mOldTextures[i]->OnActorDestroy();
|
||||
}
|
||||
if (mFrontClient) {
|
||||
mFrontClient->OnActorDestroy();
|
||||
}
|
||||
if (mFrontClientOnWhite) {
|
||||
mFrontClientOnWhite->OnActorDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
DeprecatedContentClientDoubleBuffered::~DeprecatedContentClientDoubleBuffered()
|
||||
{
|
||||
if (mDeprecatedTextureClient) {
|
||||
|
@ -238,6 +238,8 @@ public:
|
||||
return mTextureInfo;
|
||||
}
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
void DestroyBuffers();
|
||||
|
||||
@ -400,6 +402,8 @@ public:
|
||||
|
||||
virtual void SyncFrontBufferToBackBuffer() MOZ_OVERRIDE;
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual void CreateFrontBuffer(const nsIntRect& aBufferRect) MOZ_OVERRIDE;
|
||||
virtual void DestroyFrontBuffer() MOZ_OVERRIDE;
|
||||
@ -437,13 +441,13 @@ public:
|
||||
|
||||
virtual void SyncFrontBufferToBackBuffer() MOZ_OVERRIDE;
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual void CreateFrontBufferAndNotify(const nsIntRect& aBufferRect) MOZ_OVERRIDE;
|
||||
virtual void DestroyFrontBuffer() MOZ_OVERRIDE;
|
||||
virtual void LockFrontBuffer() MOZ_OVERRIDE;
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
void UpdateDestinationFrom(const RotatedBuffer& aSource,
|
||||
const nsIntRegion& aUpdateRegion);
|
||||
|
@ -299,7 +299,7 @@ public:
|
||||
virtual already_AddRefed<gfxASurface> GetAsSurface() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool AllocateForSurface(gfx::IntSize aSize,
|
||||
TextureAllocationFlags flags = ALLOC_DEFAULT) MOZ_OVERRIDE;
|
||||
TextureAllocationFlags aFlags = ALLOC_DEFAULT) MOZ_OVERRIDE;
|
||||
|
||||
// TextureClientDrawTarget
|
||||
|
||||
|
@ -93,6 +93,15 @@ CompositableHost::GetTextureHost(uint64_t aTextureID)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
CompositableHost::OnActorDestroy()
|
||||
{
|
||||
TextureHost* it = mFirstTexture;
|
||||
while (it) {
|
||||
it->OnActorDestroy();
|
||||
it = it->GetNextSibling();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CompositableHost::SetCompositor(Compositor* aCompositor)
|
||||
|
@ -112,7 +112,7 @@ public:
|
||||
* Our IPDL actor is being destroyed, get rid of any shmem resources now and
|
||||
* don't worry about compositing anymore.
|
||||
*/
|
||||
virtual void OnActorDestroy() = 0;
|
||||
virtual void OnActorDestroy();
|
||||
|
||||
// If base class overrides, it should still call the parent implementation
|
||||
virtual void SetCompositor(Compositor* aCompositor);
|
||||
|
@ -335,6 +335,18 @@ ContentHostBase::Dump(FILE* aFile,
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
ContentHostBase::OnActorDestroy()
|
||||
{
|
||||
if (mTextureHost) {
|
||||
mTextureHost->OnActorDestroy();
|
||||
}
|
||||
if (mTextureHostOnWhite) {
|
||||
mTextureHostOnWhite->OnActorDestroy();
|
||||
}
|
||||
CompositableHost::OnActorDestroy();
|
||||
}
|
||||
|
||||
DeprecatedContentHostBase::DeprecatedContentHostBase(const TextureInfo& aTextureInfo)
|
||||
: ContentHost(aTextureInfo)
|
||||
, mPaintWillResample(false)
|
||||
|
@ -104,15 +104,14 @@ public:
|
||||
virtual void SetCompositor(Compositor* aCompositor) MOZ_OVERRIDE;
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
virtual already_AddRefed<gfxImageSurface> GetAsSurface() MOZ_OVERRIDE;
|
||||
virtual TemporaryRef<gfx::DataSourceSurface> GetAsSurface() MOZ_OVERRIDE;
|
||||
|
||||
virtual void Dump(FILE* aFile=nullptr,
|
||||
const char* aPrefix="",
|
||||
bool aDumpHtml=false) MOZ_OVERRIDE;
|
||||
#endif
|
||||
#ifdef MOZ_LAYERS_HAVE_LOG
|
||||
|
||||
virtual void PrintInfo(nsACString& aTo, const char* aPrefix) MOZ_OVERRIDE;
|
||||
#endif
|
||||
|
||||
virtual TextureHost* GetAsTextureHost() MOZ_OVERRIDE;
|
||||
|
||||
@ -122,6 +121,8 @@ public:
|
||||
|
||||
virtual void SetPaintWillResample(bool aResample) { mPaintWillResample = aResample; }
|
||||
|
||||
virtual void OnActorDestroy() MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual nsIntPoint GetOriginOffset()
|
||||
{
|
||||
|
@ -186,7 +186,8 @@ GrallocTextureClientOGL::GetBuffer() const
|
||||
}
|
||||
|
||||
bool
|
||||
GrallocTextureClientOGL::AllocateForSurface(gfx::IntSize aSize)
|
||||
GrallocTextureClientOGL::AllocateForSurface(gfx::IntSize aSize,
|
||||
TextureAllocationFlags)
|
||||
{
|
||||
MOZ_ASSERT(IsValid());
|
||||
MOZ_ASSERT(mCompositable);
|
||||
|
@ -80,7 +80,8 @@ public:
|
||||
|
||||
virtual uint8_t* GetBuffer() const MOZ_OVERRIDE;
|
||||
|
||||
virtual bool AllocateForSurface(gfx::IntSize aSize) MOZ_OVERRIDE;
|
||||
virtual bool AllocateForSurface(gfx::IntSize aSize,
|
||||
TextureAllocationFlags aFlags = ALLOC_DEFAULT) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool AllocateForYCbCr(gfx::IntSize aYSize,
|
||||
gfx::IntSize aCbCrSize,
|
||||
|
Loading…
Reference in New Issue
Block a user