当前位置: 首页>>代码示例>>C++>>正文


C++ StaticRefPtr::BeginTransaction方法代码示例

本文整理汇总了C++中StaticRefPtr::BeginTransaction方法的典型用法代码示例。如果您正苦于以下问题:C++ StaticRefPtr::BeginTransaction方法的具体用法?C++ StaticRefPtr::BeginTransaction怎么用?C++ StaticRefPtr::BeginTransaction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在StaticRefPtr的用法示例。


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

示例1: FlushAllImagesSync

static void FlushAllImagesSync(ImageClient* aClient, ImageContainer* aContainer,
                               RefPtr<AsyncTransactionWaiter>&& aWaiter)
{
  if (!ImageBridgeChild::IsCreated() || ImageBridgeChild::IsShutDown()) {
    // How sad. If we get into this branch it means that the ImageBridge
    // got destroyed between the time we ImageBridgeChild::FlushAllImage
    // was called on some thread, and the time this function was proxied
    // to the ImageBridge thread. ImageBridge gets destroyed way to late
    // in the shutdown of gecko for this to be happening for a good reason.
    NS_WARNING("Something is holding on to graphics resources after the shutdown"
               "of the graphics subsystem!");
    aWaiter->DecrementWaitCount();
    return;
  }
  MOZ_ASSERT(aClient);
  sImageBridgeChildSingleton->BeginTransaction();
  if (aContainer) {
    aContainer->ClearImagesFromImageBridge();
  }
  aClient->FlushAllImages(aWaiter);
  sImageBridgeChildSingleton->EndTransaction();
  // This decrement is balanced by the increment in FlushAllImages.
  // If any AsyncTransactionTrackers were created by FlushAllImages and attached
  // to aWaiter, aWaiter will not complete until those trackers all complete.
  // Otherwise, aWaiter will be ready to complete now.
  aWaiter->DecrementWaitCount();
}
开发者ID:Eroppo,项目名称:cyberfox-beta,代码行数:27,代码来源:ImageBridgeChild.cpp

示例2: UpdateAsyncCanvasRendererNow

// static
void ImageBridgeChild::UpdateAsyncCanvasRendererNow(AsyncCanvasRenderer* aWrapper)
{
  MOZ_ASSERT(aWrapper);
  sImageBridgeChildSingleton->BeginTransaction();
  aWrapper->GetCanvasClient()->Updated();
  sImageBridgeChildSingleton->EndTransaction();
}
开发者ID:Eroppo,项目名称:cyberfox-beta,代码行数:8,代码来源:ImageBridgeChild.cpp

示例3: UpdateImageClientNow

static void UpdateImageClientNow(ImageClient* aClient, ImageContainer* aContainer)
{
  MOZ_ASSERT(aClient);
  MOZ_ASSERT(aContainer);
  sImageBridgeChildSingleton->BeginTransaction();
  aClient->UpdateImage(aContainer, Layer::CONTENT_OPAQUE);
  sImageBridgeChildSingleton->EndTransaction();
}
开发者ID:Jinwoo-Song,项目名称:gecko-dev,代码行数:8,代码来源:ImageBridgeChild.cpp

示例4: FlushAllImagesSync

static void FlushAllImagesSync(ImageClient* aClient, ImageContainer* aContainer, bool aExceptFront, AsyncTransactionTracker* aStatus)
{
  MOZ_ASSERT(aClient);
  sImageBridgeChildSingleton->BeginTransaction();
  if (aContainer && !aExceptFront) {
    aContainer->ClearCurrentImage();
  }
  aClient->FlushAllImages(aExceptFront, aStatus);
  aClient->OnTransaction();
  sImageBridgeChildSingleton->EndTransaction();
}
开发者ID:afabbro,项目名称:gecko-dev,代码行数:11,代码来源:ImageBridgeChild.cpp

示例5: FlushAllImagesNow

//static
void ImageBridgeChild::FlushAllImagesNow(ImageClient* aClient, ImageContainer* aContainer, bool aExceptFront)
{
  MOZ_ASSERT(aClient);
  sImageBridgeChildSingleton->BeginTransaction();
  if (aContainer && !aExceptFront) {
    aContainer->ClearCurrentImage();
  }
  aClient->FlushAllImages(aExceptFront);
  aClient->OnTransaction();
  sImageBridgeChildSingleton->EndTransaction();
}
开发者ID:micadeyeye,项目名称:gecko-dev,代码行数:12,代码来源:ImageBridgeChild.cpp

示例6: UpdateImageClientNow

static void UpdateImageClientNow(ImageClient* aClient, RefPtr<ImageContainer>&& aContainer)
{
  if (!ImageBridgeChild::IsCreated() || ImageBridgeChild::IsShutDown()) {
    NS_WARNING("Something is holding on to graphics resources after the shutdown"
               "of the graphics subsystem!");
    return;
  }
  MOZ_ASSERT(aClient);
  MOZ_ASSERT(aContainer);
  sImageBridgeChildSingleton->BeginTransaction();
  aClient->UpdateImage(aContainer, Layer::CONTENT_OPAQUE);
  sImageBridgeChildSingleton->EndTransaction();
}
开发者ID:Eroppo,项目名称:cyberfox-beta,代码行数:13,代码来源:ImageBridgeChild.cpp

示例7: FlushAllImagesSync

static void FlushAllImagesSync(ImageClient* aClient, ImageContainer* aContainer,
                               AsyncTransactionWaiter* aWaiter)
{
  MOZ_ASSERT(aClient);
  sImageBridgeChildSingleton->BeginTransaction();
  if (aContainer) {
    aContainer->ClearImagesFromImageBridge();
  }
  aClient->FlushAllImages(aWaiter);
  sImageBridgeChildSingleton->EndTransaction();
  // This decrement is balanced by the increment in FlushAllImages.
  // If any AsyncTransactionTrackers were created by FlushAllImages and attached
  // to aWaiter, aWaiter will not complete until those trackers all complete.
  // Otherwise, aWaiter will be ready to complete now.
  aWaiter->DecrementWaitCount();
}
开发者ID:Jinwoo-Song,项目名称:gecko-dev,代码行数:16,代码来源:ImageBridgeChild.cpp


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