зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1317554. Make the notifications that VectorImage sends on draw async. r=aosmond
This commit is contained in:
Родитель
6393f96201
Коммит
a8ff4ecff5
|
@ -985,8 +985,19 @@ VectorImage::CreateSurfaceAndShow(const SVGDrawingParameters& aParams, BackendTy
|
|||
|
||||
// Send out an invalidation so that surfaces that are still in use get
|
||||
// re-locked. See the discussion of the UnlockSurfaces call above.
|
||||
mProgressTracker->SyncNotifyProgress(FLAG_FRAME_COMPLETE,
|
||||
GetMaxSizedIntRect());
|
||||
if (!(aParams.flags & FLAG_ASYNC_NOTIFY)) {
|
||||
mProgressTracker->SyncNotifyProgress(FLAG_FRAME_COMPLETE,
|
||||
GetMaxSizedIntRect());
|
||||
} else {
|
||||
NotNull<RefPtr<VectorImage>> image = WrapNotNull(this);
|
||||
NS_DispatchToMainThread(NS_NewRunnableFunction([=]() -> void {
|
||||
RefPtr<ProgressTracker> tracker = image->GetProgressTracker();
|
||||
if (tracker) {
|
||||
tracker->SyncNotifyProgress(FLAG_FRAME_COMPLETE,
|
||||
GetMaxSizedIntRect());
|
||||
}
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче