您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ HasShadowManager函数代码示例

51自学网 2021-06-01 21:25:37
  C++
这篇教程C++ HasShadowManager函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中HasShadowManager函数的典型用法代码示例。如果您正苦于以下问题:C++ HasShadowManager函数的具体用法?C++ HasShadowManager怎么用?C++ HasShadowManager使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了HasShadowManager函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: switch

voidClientLayerManager::ForwardTransaction(){  mPhase = PHASE_FORWARD;  // forward this transaction's changeset to our LayerManagerComposite  bool sent;  AutoInfallibleTArray<EditReply, 10> replies;  if (HasShadowManager() && mForwarder->EndTransaction(&replies, &sent)) {    for (nsTArray<EditReply>::size_type i = 0; i < replies.Length(); ++i) {      const EditReply& reply = replies[i];      switch (reply.type()) {      case EditReply::TOpContentBufferSwap: {        MOZ_LAYERS_LOG(("[LayersForwarder] DoubleBufferSwap"));        const OpContentBufferSwap& obs = reply.get_OpContentBufferSwap();        CompositableChild* compositableChild =          static_cast<CompositableChild*>(obs.compositableChild());        ContentClientRemote* contentClient =          static_cast<ContentClientRemote*>(compositableChild->GetCompositableClient());        MOZ_ASSERT(contentClient);        contentClient->SwapBuffers(obs.frontUpdatedRegion());        break;      }      case EditReply::TOpTextureSwap: {        MOZ_LAYERS_LOG(("[LayersForwarder] TextureSwap"));        const OpTextureSwap& ots = reply.get_OpTextureSwap();        CompositableChild* compositableChild =          static_cast<CompositableChild*>(ots.compositableChild());        MOZ_ASSERT(compositableChild);        compositableChild->GetCompositableClient()          ->SetDescriptorFromReply(ots.textureId(), ots.image());        break;      }      default:        NS_RUNTIMEABORT("not reached");      }    }    if (sent) {      mNeedsComposite = false;    }  } else if (HasShadowManager()) {    NS_WARNING("failed to forward Layers transaction");  }  mPhase = PHASE_NONE;  // this may result in Layers being deleted, which results in  // PLayer::Send__delete__() and DeallocShmem()  mKeepAlive.Clear();}
开发者ID:pfgenyun,项目名称:loongson-mozilla-central,代码行数:60,


示例2: MOZ_ASSERT

boolClientLayerManager::RequestOverfill(mozilla::dom::OverfillCallback* aCallback){  MOZ_ASSERT(aCallback != nullptr);  MOZ_ASSERT(HasShadowManager(), "Request Overfill only supported on b2g for now");  if (HasShadowManager()) {    CompositorChild* child = GetRemoteRenderer();    NS_ASSERTION(child, "Could not get CompositorChild");    child->AddOverfillObserver(this);    child->SendRequestOverfill();    mOverfillCallbacks.AppendElement(aCallback);  }  return true;}
开发者ID:bolt-dev,项目名称:gecko-dev,代码行数:17,


示例3: MOZ_ASSERT

voidClientLayerManager::ClearCachedResources(Layer* aSubtree){  MOZ_ASSERT(!HasShadowManager() || !aSubtree);  mForwarder->ClearCachedResources();  if (aSubtree) {    ClearLayer(aSubtree);  } else if (mRoot) {    ClearLayer(mRoot);  }  for (size_t i = 0; i < mTexturePools.Length(); i++) {    mTexturePools[i]->Clear();  }}
开发者ID:martasect,项目名称:gecko,代码行数:14,


示例4: MOZ_ASSERT

voidClientLayerManager::ClearCachedResources(Layer* aSubtree){  if (mDestroyed) {    // ClearCachedResource was already called by ClientLayerManager::Destroy    return;  }  MOZ_ASSERT(!HasShadowManager() || !aSubtree);  mForwarder->ClearCachedResources();  if (aSubtree) {    ClearLayer(aSubtree);  } else if (mRoot) {    ClearLayer(mRoot);  }}
开发者ID:yrliou,项目名称:gecko-dev,代码行数:15,


示例5: MOZ_ASSERT

voidClientLayerManager::ClearCachedResources(Layer* aSubtree){  if (mDestroyed) {    // ClearCachedResource was already called by ClientLayerManager::Destroy    return;  }  MOZ_ASSERT(!HasShadowManager() || !aSubtree);  mForwarder->ClearCachedResources();  if (aSubtree) {    ClearLayer(aSubtree);  } else if (mRoot) {    ClearLayer(mRoot);  }  if (GetCompositorBridgeChild()) {    GetCompositorBridgeChild()->ClearTexturePool();  }}
开发者ID:carriercomm,项目名称:gecko-dev,代码行数:19,


示例6: NS_ASSERTION

already_AddRefed<ThebesLayer>BasicShadowLayerManager::CreateThebesLayer(){  NS_ASSERTION(InConstruction(), "Only allowed in construction phase");#ifdef FORCE_BASICTILEDTHEBESLAYER  if (HasShadowManager() && GetCompositorBackendType() == LAYERS_OPENGL) {    // BasicTiledThebesLayer doesn't support main    // thread compositing so only return this layer    // type if we have a shadow manager.    nsRefPtr<BasicTiledThebesLayer> layer =      new BasicTiledThebesLayer(this);    MAYBE_CREATE_SHADOW(Thebes);    return layer.forget();  } else#endif  {    nsRefPtr<BasicShadowableThebesLayer> layer =      new BasicShadowableThebesLayer(this);    MAYBE_CREATE_SHADOW(Thebes);    return layer.forget();  }}
开发者ID:chiehwen,项目名称:mozilla-central,代码行数:22,


示例7: switch

voidClientLayerManager::ForwardTransaction(bool aScheduleComposite){  TimeStamp start = TimeStamp::Now();  if (mForwarder->GetSyncObject()) {    mForwarder->GetSyncObject()->FinalizeFrame();  }  mPhase = PHASE_FORWARD;  mLatestTransactionId = mTransactionIdAllocator->GetTransactionId();  TimeStamp transactionStart;  if (!mTransactionIdAllocator->GetTransactionStart().IsNull()) {    transactionStart = mTransactionIdAllocator->GetTransactionStart();  } else {    transactionStart = mTransactionStart;  }  // forward this transaction's changeset to our LayerManagerComposite  bool sent;  AutoInfallibleTArray<EditReply, 10> replies;  if (mForwarder->EndTransaction(&replies, mRegionToClear,        mLatestTransactionId, aScheduleComposite, mPaintSequenceNumber,        mIsRepeatTransaction, transactionStart, &sent)) {    for (nsTArray<EditReply>::size_type i = 0; i < replies.Length(); ++i) {      const EditReply& reply = replies[i];      switch (reply.type()) {      case EditReply::TOpContentBufferSwap: {        MOZ_LAYERS_LOG(("[LayersForwarder] DoubleBufferSwap"));        const OpContentBufferSwap& obs = reply.get_OpContentBufferSwap();        CompositableClient* compositable =          CompositableClient::FromIPDLActor(obs.compositableChild());        ContentClientRemote* contentClient =          static_cast<ContentClientRemote*>(compositable);        MOZ_ASSERT(contentClient);        contentClient->SwapBuffers(obs.frontUpdatedRegion());        break;      }      default:        NS_RUNTIMEABORT("not reached");      }    }    if (sent) {      mNeedsComposite = false;    }  } else if (HasShadowManager()) {    NS_WARNING("failed to forward Layers transaction");  }  if (!sent) {    // Clear the transaction id so that it doesn't get returned    // unless we forwarded to somewhere that doesn't actually    // have a compositor.    mTransactionIdAllocator->RevokeTransactionId(mLatestTransactionId);  }  mForwarder->RemoveTexturesIfNecessary();  mForwarder->RemoveCompositablesIfNecessary();  mForwarder->SendPendingAsyncMessges();  mPhase = PHASE_NONE;  // this may result in Layers being deleted, which results in  // PLayer::Send__delete__() and DeallocShmem()  mKeepAlive.Clear();  TabChild* window = mWidget->GetOwningTabChild();  if (window) {    TimeStamp end = TimeStamp::Now();    window->DidRequestComposite(start, end);  }}
开发者ID:bolt-dev,项目名称:gecko-dev,代码行数:78,


示例8: switch

voidClientLayerManager::ForwardTransaction(bool aScheduleComposite){  mPhase = PHASE_FORWARD;  mLatestTransactionId = mTransactionIdAllocator->GetTransactionId();  TimeStamp transactionStart;  if (!mTransactionIdAllocator->GetTransactionStart().IsNull()) {    transactionStart = mTransactionIdAllocator->GetTransactionStart();  } else {    transactionStart = mTransactionStart;  }  // forward this transaction's changeset to our LayerManagerComposite  bool sent;  AutoInfallibleTArray<EditReply, 10> replies;  if (mForwarder->EndTransaction(&replies, mRegionToClear,        mLatestTransactionId, aScheduleComposite, mPaintSequenceNumber,        mIsRepeatTransaction, transactionStart, &sent)) {    for (nsTArray<EditReply>::size_type i = 0; i < replies.Length(); ++i) {      const EditReply& reply = replies[i];      switch (reply.type()) {      case EditReply::TOpContentBufferSwap: {        MOZ_LAYERS_LOG(("[LayersForwarder] DoubleBufferSwap"));        const OpContentBufferSwap& obs = reply.get_OpContentBufferSwap();        CompositableClient* compositable =          CompositableClient::FromIPDLActor(obs.compositableChild());        ContentClientRemote* contentClient =          static_cast<ContentClientRemote*>(compositable);        MOZ_ASSERT(contentClient);        contentClient->SwapBuffers(obs.frontUpdatedRegion());        break;      }      case EditReply::TOpTextureSwap: {        MOZ_LAYERS_LOG(("[LayersForwarder] TextureSwap"));        const OpTextureSwap& ots = reply.get_OpTextureSwap();        CompositableClient* compositable =          CompositableClient::FromIPDLActor(ots.compositableChild());        MOZ_ASSERT(compositable);        compositable->SetDescriptorFromReply(ots.textureId(), ots.image());        break;      }      case EditReply::TReturnReleaseFence: {        const ReturnReleaseFence& rep = reply.get_ReturnReleaseFence();        FenceHandle fence = rep.fence();        PTextureChild* child = rep.textureChild();        if (!fence.IsValid() || !child) {          break;        }        RefPtr<TextureClient> texture = TextureClient::AsTextureClient(child);        if (texture) {          texture->SetReleaseFenceHandle(fence);        }        break;      }      default:        NS_RUNTIMEABORT("not reached");      }    }    if (sent) {      mNeedsComposite = false;    }  } else if (HasShadowManager()) {    NS_WARNING("failed to forward Layers transaction");  }  if (!sent) {    // Clear the transaction id so that it doesn't get returned    // unless we forwarded to somewhere that doesn't actually    // have a compositor.    mTransactionIdAllocator->RevokeTransactionId(mLatestTransactionId);  }  mForwarder->RemoveTexturesIfNecessary();  mForwarder->SendPendingAsyncMessge();  mPhase = PHASE_NONE;  // this may result in Layers being deleted, which results in  // PLayer::Send__delete__() and DeallocShmem()  mKeepAlive.Clear();}
开发者ID:martasect,项目名称:gecko,代码行数:91,


示例9: tracing

voidClientLayerManager::ForwardTransaction(bool aScheduleComposite){  AutoProfilerTracing tracing("Paint", "ForwardTransaction");  TimeStamp start = TimeStamp::Now();  // Skip the synchronization for buffer since we also skip the painting during  // device-reset status.  if (!gfxPlatform::GetPlatform()->DidRenderingDeviceReset()) {    if (mForwarder->GetSyncObject() &&        mForwarder->GetSyncObject()->IsSyncObjectValid()) {      mForwarder->GetSyncObject()->Synchronize();    }  }  mPhase = PHASE_FORWARD;  mLatestTransactionId = mTransactionIdAllocator->GetTransactionId(!mIsRepeatTransaction);  TimeStamp transactionStart;  if (!mTransactionIdAllocator->GetTransactionStart().IsNull()) {    transactionStart = mTransactionIdAllocator->GetTransactionStart();  } else {    transactionStart = mTransactionStart;  }  if (gfxPrefs::AlwaysPaint() && XRE_IsContentProcess()) {    mForwarder->SendPaintTime(mLatestTransactionId, mLastPaintTime);  }  // forward this transaction's changeset to our LayerManagerComposite  bool sent = false;  bool ok = mForwarder->EndTransaction(    mRegionToClear, mLatestTransactionId, aScheduleComposite,    mPaintSequenceNumber, mIsRepeatTransaction, transactionStart,    &sent);  if (ok) {    if (sent) {      mNeedsComposite = false;    }  } else if (HasShadowManager()) {    NS_WARNING("failed to forward Layers transaction");  }  if (!sent) {    // Clear the transaction id so that it doesn't get returned    // unless we forwarded to somewhere that doesn't actually    // have a compositor.    mTransactionIdAllocator->RevokeTransactionId(mLatestTransactionId);  }  mPhase = PHASE_NONE;  // this may result in Layers being deleted, which results in  // PLayer::Send__delete__() and DeallocShmem()  mKeepAlive.Clear();  TabChild* window = mWidget ? mWidget->GetOwningTabChild() : nullptr;  if (window) {    TimeStamp end = TimeStamp::Now();    window->DidRequestComposite(start, end);  }}
开发者ID:yrliou,项目名称:gecko-dev,代码行数:62,


示例10: switch

voidClientLayerManager::ForwardTransaction(){  mPhase = PHASE_FORWARD;  // forward this transaction's changeset to our LayerManagerComposite  AutoInfallibleTArray<EditReply, 10> replies;  if (HasShadowManager() && ShadowLayerForwarder::EndTransaction(&replies)) {    for (nsTArray<EditReply>::size_type i = 0; i < replies.Length(); ++i) {      const EditReply& reply = replies[i];      switch (reply.type()) {      case EditReply::TOpContentBufferSwap: {        MOZ_LAYERS_LOG(("[LayersForwarder] DoubleBufferSwap"));        const OpContentBufferSwap& obs = reply.get_OpContentBufferSwap();        CompositableChild* compositableChild =          static_cast<CompositableChild*>(obs.compositableChild());        ContentClientRemote* contentClient =          static_cast<ContentClientRemote*>(compositableChild->GetCompositableClient());        MOZ_ASSERT(contentClient);        contentClient->SwapBuffers(obs.frontUpdatedRegion());        break;      }      case EditReply::TOpTextureSwap: {        MOZ_LAYERS_LOG(("[LayersForwarder] TextureSwap"));        const OpTextureSwap& ots = reply.get_OpTextureSwap();        CompositableChild* compositableChild =          static_cast<CompositableChild*>(ots.compositableChild());        MOZ_ASSERT(compositableChild);        compositableChild->GetCompositableClient()          ->SetDescriptorFromReply(ots.textureId(), ots.image());        break;      }      case EditReply::TReplyTextureRemoved: {        // XXX - to manage reuse of gralloc buffers, we'll need to add some        // glue code here to find the TextureClient and invoke a callback to        // let the camera know that the gralloc buffer is not used anymore on        // the compositor side and that it can reuse it.        break;      }      default:        NS_RUNTIMEABORT("not reached");      }    }  } else if (HasShadowManager()) {    NS_WARNING("failed to forward Layers transaction");  }  mPhase = PHASE_NONE;  // this may result in Layers being deleted, which results in  // PLayer::Send__delete__() and DeallocShmem()  mKeepAlive.Clear();}
开发者ID:tomazj,项目名称:mozilla-central,代码行数:62,



注:本文中的HasShadowManager函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ HashString函数代码示例
C++ HasOverlappedIoCompleted函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。