зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1136352 - Fix RemoveTextureAsync handling r=nical
This commit is contained in:
Родитель
37a4046738
Коммит
8bf7183124
|
@ -143,7 +143,7 @@ CompositableParentManager::ReceiveCompositableUpdate(const CompositableOperation
|
|||
MOZ_ASSERT(tex.get());
|
||||
compositable->RemoveTextureHost(tex);
|
||||
|
||||
if (!IsAsync() && GetChildProcessId()) {
|
||||
if (!IsAsync() && ImageBridgeParent::GetInstance(GetChildProcessId())) {
|
||||
// send FenceHandle if present via ImageBridge.
|
||||
ImageBridgeParent::SendFenceHandleToTrackerIfPresent(
|
||||
GetChildProcessId(),
|
||||
|
|
|
@ -454,13 +454,11 @@ ImageBridgeParent::SendFenceHandleToTrackerIfPresent(base::ProcessId aChildProce
|
|||
/*static*/ void
|
||||
ImageBridgeParent::SendPendingAsyncMessges(base::ProcessId aChildProcessId)
|
||||
{
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
ImageBridgeParent* imageBridge = ImageBridgeParent::GetInstance(aChildProcessId);
|
||||
if (!imageBridge) {
|
||||
return;
|
||||
}
|
||||
imageBridge->SendPendingAsyncMessges();
|
||||
#endif
|
||||
}
|
||||
|
||||
} // layers
|
||||
|
|
|
@ -935,20 +935,23 @@ LayerTransactionParent::RecvChildAsyncMessages(InfallibleTArray<AsyncChildMessag
|
|||
MOZ_ASSERT(tex.get());
|
||||
compositable->RemoveTextureHost(tex);
|
||||
|
||||
// send FenceHandle if present via ImageBridge.
|
||||
ImageBridgeParent::SendFenceHandleToTrackerIfPresent(
|
||||
GetChildProcessId(),
|
||||
op.holderId(),
|
||||
op.transactionId(),
|
||||
op.textureParent(),
|
||||
compositable);
|
||||
|
||||
// Send message back via PImageBridge.
|
||||
ImageBridgeParent::ReplyRemoveTexture(
|
||||
GetChildProcessId(),
|
||||
OpReplyRemoveTexture(true, // isMain
|
||||
op.holderId(),
|
||||
op.transactionId()));
|
||||
if (ImageBridgeParent::GetInstance(GetChildProcessId())) {
|
||||
// send FenceHandle if present via ImageBridge.
|
||||
ImageBridgeParent::SendFenceHandleToTrackerIfPresent(
|
||||
GetChildProcessId(),
|
||||
op.holderId(),
|
||||
op.transactionId(),
|
||||
op.textureParent(),
|
||||
compositable);
|
||||
// Send message back via PImageBridge.
|
||||
ImageBridgeParent::ReplyRemoveTexture(
|
||||
GetChildProcessId(),
|
||||
OpReplyRemoveTexture(true, // isMain
|
||||
op.holderId(),
|
||||
op.transactionId()));
|
||||
} else {
|
||||
NS_ERROR("ImageBridgeParent should exist");
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
@ -470,10 +470,14 @@ ShadowLayerForwarder::RemoveTextureFromCompositableAsync(AsyncTransactionTracker
|
|||
} else {
|
||||
// If the function is called outside of transaction,
|
||||
// OpRemoveTextureAsync message is stored as pending message.
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
mPendingAsyncMessages.push_back(OpRemoveTextureAsync(CompositableClient::GetTrackersHolderId(aCompositable->GetIPDLActor()),
|
||||
aAsyncTransactionTracker->GetId(),
|
||||
nullptr, aCompositable->GetIPDLActor(),
|
||||
nullptr, aTexture->GetIPDLActor()));
|
||||
#else
|
||||
NS_RUNTIMEABORT("not reached");
|
||||
#endif
|
||||
}
|
||||
CompositableClient::HoldUntilComplete(aCompositable->GetIPDLActor(),
|
||||
aAsyncTransactionTracker);
|
||||
|
|
Загрузка…
Ссылка в новой задаче