зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1634253 - P5. Make threading model clearer. r=kats
CompositorBridgeParent::ScheduleTask was always called from the compositor thread ; so make it explicit that we are dispatching the task to the compositor thread. We inline the method instead. Differential Revision: https://phabricator.services.mozilla.com/D73824
This commit is contained in:
Родитель
4f02149e61
Коммит
48971d875b
|
@ -833,15 +833,6 @@ bool CompositorBridgeParent::ScheduleResumeOnCompositorThread(int x, int y,
|
|||
return !mPaused;
|
||||
}
|
||||
|
||||
void CompositorBridgeParent::ScheduleTask(
|
||||
already_AddRefed<CancelableRunnable> task, int time) {
|
||||
if (time == 0) {
|
||||
MessageLoop::current()->PostTask(std::move(task));
|
||||
} else {
|
||||
MessageLoop::current()->PostDelayedTask(std::move(task), time);
|
||||
}
|
||||
}
|
||||
|
||||
void CompositorBridgeParent::UpdatePaintTime(LayerTransactionParent* aLayerTree,
|
||||
const TimeDuration& aPaintTime) {
|
||||
// We get a lot of paint timings for things with empty transactions.
|
||||
|
@ -1234,7 +1225,12 @@ void CompositorBridgeParent::ScheduleRotationOnCompositorThread(
|
|||
"layers::CompositorBridgeParent::ForceComposition", this,
|
||||
&CompositorBridgeParent::ForceComposition);
|
||||
mForceCompositionTask = task;
|
||||
ScheduleTask(task.forget(), StaticPrefs::layers_orientation_sync_timeout());
|
||||
if (StaticPrefs::layers_orientation_sync_timeout() == 0) {
|
||||
CompositorThreadHolder::Loop()->PostTask(task.forget());
|
||||
} else {
|
||||
CompositorThreadHolder::Loop()->PostDelayedTask(
|
||||
task.forget(), StaticPrefs::layers_orientation_sync_timeout());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -750,7 +750,6 @@ class CompositorBridgeParent final : public CompositorBridgeParentBase,
|
|||
const LayersId& aId) override;
|
||||
bool DeallocPLayerTransactionParent(
|
||||
PLayerTransactionParent* aLayers) override;
|
||||
virtual void ScheduleTask(already_AddRefed<CancelableRunnable>, int);
|
||||
|
||||
void SetEGLSurfaceRect(int x, int y, int width, int height);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче