Bug 1734811 - consider to use higher priority for the imglib tasks r=tnikkel

Depends on D127935

Differential Revision: https://phabricator.services.mozilla.com/D127936
This commit is contained in:
Olli Pettay
2021-10-08 19:29:37 +00:00
parent 7694b76889
commit ee4d895567
10 changed files with 28 additions and 26 deletions

View File

@@ -1141,7 +1141,7 @@ void VectorImage::SendFrameComplete(bool aDidCache, uint32_t aFlags) {
GetMaxSizedIntRect());
} else {
NotNull<RefPtr<VectorImage>> image = WrapNotNull(this);
NS_DispatchToMainThread(CreateMediumHighRunnable(NS_NewRunnableFunction(
NS_DispatchToMainThread(CreateRenderBlockingRunnable(NS_NewRunnableFunction(
"ProgressTracker::SyncNotifyProgress", [=]() -> void {
RefPtr<ProgressTracker> tracker = image->GetProgressTracker();
if (tracker) {
@@ -1504,7 +1504,7 @@ void VectorImage::InvalidateObserversOnNextRefreshDriverTick() {
nsCOMPtr<nsIRunnable> ev(NS_NewRunnableFunction(
"VectorImage::SendInvalidationNotifications",
[=]() -> void { self->SendInvalidationNotifications(); }));
eventTarget->Dispatch(CreateMediumHighRunnable(ev.forget()),
eventTarget->Dispatch(CreateRenderBlockingRunnable(ev.forget()),
NS_DISPATCH_NORMAL);
}