本文整理汇总了C++中LayerTransactionParent::SetPendingCompositorUpdates方法的典型用法代码示例。如果您正苦于以下问题:C++ LayerTransactionParent::SetPendingCompositorUpdates方法的具体用法?C++ LayerTransactionParent::SetPendingCompositorUpdates怎么用?C++ LayerTransactionParent::SetPendingCompositorUpdates使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LayerTransactionParent
的用法示例。
在下文中一共展示了LayerTransactionParent::SetPendingCompositorUpdates方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lock
PLayerTransactionParent*
CrossProcessCompositorBridgeParent::AllocPLayerTransactionParent(
const nsTArray<LayersBackend>&,
const uint64_t& aId,
TextureFactoryIdentifier* aTextureFactoryIdentifier,
bool *aSuccess)
{
MOZ_ASSERT(aId != 0);
// Check to see if this child process has access to this layer tree.
if (!LayerTreeOwnerTracker::Get()->IsMapped(aId, OtherPid())) {
NS_ERROR("Unexpected layers id in AllocPLayerTransactionParent; dropping message...");
return nullptr;
}
MonitorAutoLock lock(*sIndirectLayerTreesLock);
CompositorBridgeParent::LayerTreeState* state = nullptr;
LayerTreeMap::iterator itr = sIndirectLayerTrees.find(aId);
if (sIndirectLayerTrees.end() != itr) {
state = &itr->second;
}
if (state && state->mLayerManager) {
state->mCrossProcessParent = this;
HostLayerManager* lm = state->mLayerManager;
*aTextureFactoryIdentifier = lm->GetCompositor()->GetTextureFactoryIdentifier();
*aSuccess = true;
LayerTransactionParent* p = new LayerTransactionParent(lm, this, aId);
p->AddIPDLReference();
sIndirectLayerTrees[aId].mLayerTree = p;
p->SetPendingCompositorUpdates(state->mPendingCompositorUpdates);
return p;
}
NS_WARNING("Created child without a matching parent?");
// XXX: should be false, but that causes us to fail some tests on Mac w/ OMTC.
// Bug 900745. change *aSuccess to false to see test failures.
*aSuccess = true;
LayerTransactionParent* p = new LayerTransactionParent(nullptr, this, aId);
p->AddIPDLReference();
return p;
}