mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1016805 - fix AsyncTransactionTracker handling r=nical
This commit is contained in:
parent
0a99c4b213
commit
92b1a2feb0
@ -83,8 +83,8 @@ ImageClient::RemoveTextureWithTracker(TextureClient* aTexture,
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
// AsyncTransactionTracker is supported only on ImageBridge.
|
||||
// Use AsyncTransactionTracker only when TextureClient is recyeled.
|
||||
if (GetForwarder()->IsImageBridgeChild() &&
|
||||
aTexture->HasRecycleCallback()) {
|
||||
if (aAsyncTransactionTracker ||
|
||||
(GetForwarder()->IsImageBridgeChild() && aTexture->HasRecycleCallback())) {
|
||||
RefPtr<AsyncTransactionTracker> request = aAsyncTransactionTracker;
|
||||
if (!request) {
|
||||
// Create AsyncTransactionTracker if it is not provided as argument.
|
||||
|
@ -399,14 +399,14 @@ void ImageBridgeChild::DispatchImageClientUpdate(ImageClient* aClient,
|
||||
nsRefPtr<ImageContainer> >(&UpdateImageClientNow, aClient, aContainer));
|
||||
}
|
||||
|
||||
static void FlushAllImagesSync(ImageClient* aClient, ImageContainer* aContainer, bool aExceptFront, AsyncTransactionTracker* aStatus)
|
||||
static void FlushAllImagesSync(ImageClient* aClient, ImageContainer* aContainer, bool aExceptFront, AsyncTransactionTracker* aTracker)
|
||||
{
|
||||
MOZ_ASSERT(aClient);
|
||||
sImageBridgeChildSingleton->BeginTransaction();
|
||||
if (aContainer && !aExceptFront) {
|
||||
aContainer->ClearCurrentImage();
|
||||
}
|
||||
aClient->FlushAllImages(aExceptFront, aStatus);
|
||||
aClient->FlushAllImages(aExceptFront, aTracker);
|
||||
aClient->OnTransaction();
|
||||
sImageBridgeChildSingleton->EndTransaction();
|
||||
}
|
||||
@ -425,13 +425,17 @@ void ImageBridgeChild::FlushAllImages(ImageClient* aClient, ImageContainer* aCon
|
||||
return;
|
||||
}
|
||||
|
||||
RefPtr<AsyncTransactionTracker> status = aClient->PrepareFlushAllImages();
|
||||
|
||||
RefPtr<AsyncTransactionTracker> tracker;
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
tracker = aClient->PrepareFlushAllImages();
|
||||
#endif
|
||||
sImageBridgeChildSingleton->GetMessageLoop()->PostTask(
|
||||
FROM_HERE,
|
||||
NewRunnableFunction(&FlushAllImagesSync, aClient, aContainer, aExceptFront, status));
|
||||
NewRunnableFunction(&FlushAllImagesSync, aClient, aContainer, aExceptFront, tracker));
|
||||
|
||||
status->WaitComplete();
|
||||
if (tracker) {
|
||||
tracker->WaitComplete();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user