mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1000660 - Remove TextureParent::RecvRemoveTextureSync() r=nical
This commit is contained in:
parent
cdf90b2da8
commit
704286c61e
@ -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();
|
||||
|
@ -363,13 +363,13 @@ void ImageBridgeChild::FlushAllImages(ImageClient* aClient, ImageContainer* aCon
|
||||
NS_ERROR("ImageBridgeChild::FlushAllImages() is called on ImageBridge thread.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
RefPtr<AsyncTransactionTracker> status = aClient->PrepareFlushAllImages();
|
||||
|
||||
|
||||
sImageBridgeChildSingleton->GetMessageLoop()->PostTask(
|
||||
FROM_HERE,
|
||||
NewRunnableFunction(&FlushAllImagesSync, aClient, aContainer, aExceptFront, status));
|
||||
|
||||
|
||||
status->WaitComplete();
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user