зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1000660 - Remove TextureParent::RecvRemoveTextureSync() r=nical
This commit is contained in:
Родитель
655ac2752b
Коммит
5ed7dc913b
|
@ -452,11 +452,10 @@ void TextureClient::ForceRemove()
|
|||
{
|
||||
if (mValid && mActor) {
|
||||
if (GetFlags() & TextureFlags::DEALLOCATE_CLIENT) {
|
||||
mActor->SetTextureData(DropTextureData());
|
||||
if (mActor->IPCOpen()) {
|
||||
mActor->SendRemoveTextureSync();
|
||||
mActor->SendClearTextureHostSync();
|
||||
mActor->SendRemoveTexture();
|
||||
}
|
||||
mActor->DeleteTextureData();
|
||||
} else {
|
||||
if (mActor->IPCOpen()) {
|
||||
mActor->SendRemoveTexture();
|
||||
|
|
|
@ -88,14 +88,16 @@ public:
|
|||
|
||||
virtual bool RecvClientRecycle() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool RecvRemoveTexture() MOZ_OVERRIDE;
|
||||
virtual bool RecvClearTextureHostSync() MOZ_OVERRIDE;
|
||||
|
||||
virtual bool RecvRemoveTextureSync() MOZ_OVERRIDE;
|
||||
virtual bool RecvRemoveTexture() MOZ_OVERRIDE;
|
||||
|
||||
TextureHost* GetTextureHost() { return mTextureHost; }
|
||||
|
||||
void ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE;
|
||||
|
||||
void ClearTextureHost();
|
||||
|
||||
CompositableParentManager* mCompositableManager;
|
||||
RefPtr<TextureHost> mWaitForClientRecycle;
|
||||
RefPtr<TextureHost> mTextureHost;
|
||||
|
@ -737,20 +739,15 @@ TextureParent::RecvRemoveTexture()
|
|||
}
|
||||
|
||||
bool
|
||||
TextureParent::RecvRemoveTextureSync()
|
||||
TextureParent::RecvClearTextureHostSync()
|
||||
{
|
||||
// we don't need to send a reply in the synchronous case since the child side
|
||||
// has the guarantee that this message has been handled synchronously.
|
||||
return PTextureParent::Send__delete__(this);
|
||||
ClearTextureHost();
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
TextureParent::ActorDestroy(ActorDestroyReason why)
|
||||
{
|
||||
if (!mTextureHost) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (why) {
|
||||
case AncestorDeletion:
|
||||
case Deletion:
|
||||
|
@ -761,6 +758,16 @@ TextureParent::ActorDestroy(ActorDestroyReason why)
|
|||
NS_RUNTIMEABORT("FailedConstructor isn't possible in PTexture");
|
||||
}
|
||||
|
||||
ClearTextureHost();
|
||||
}
|
||||
|
||||
void
|
||||
TextureParent::ClearTextureHost()
|
||||
{
|
||||
if (!mTextureHost) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mTextureHost->GetFlags() & TextureFlags::RECYCLE) {
|
||||
RECYCLE_LOG("clear recycling for tile %p\n", this);
|
||||
mTextureHost->ClearRecycleCallback();
|
||||
|
|
|
@ -30,15 +30,15 @@ parent:
|
|||
|
||||
async ClientRecycle();
|
||||
|
||||
/**
|
||||
* Synchronously tell the TextureChild to clear TextureHost.
|
||||
*/
|
||||
sync ClearTextureHostSync();
|
||||
|
||||
/**
|
||||
* Asynchronously tell the Compositor side to remove the texture.
|
||||
*/
|
||||
async RemoveTexture();
|
||||
|
||||
/**
|
||||
* Synchronously tell the compositor side to remove the texture.
|
||||
*/
|
||||
sync RemoveTextureSync();
|
||||
};
|
||||
|
||||
} // layers
|
||||
|
|
Загрузка…
Ссылка в новой задаче