本文整理汇总了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();
}
示例2: UpdateAsyncCanvasRendererNow
// static
void ImageBridgeChild::UpdateAsyncCanvasRendererNow(AsyncCanvasRenderer* aWrapper)
{
MOZ_ASSERT(aWrapper);
sImageBridgeChildSingleton->BeginTransaction();
aWrapper->GetCanvasClient()->Updated();
sImageBridgeChildSingleton->EndTransaction();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}