mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1704227. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D113191
This commit is contained in:
parent
43e5d7e69f
commit
77a93b91d2
@ -1209,29 +1209,34 @@ void wr_notifier_external_event(mozilla::wr::WrWindowId aWindowId,
|
||||
std::move(evt));
|
||||
}
|
||||
|
||||
void wr_schedule_render(mozilla::wr::WrWindowId aWindowId) {
|
||||
static void NotifyScheduleRender(mozilla::wr::WrWindowId aWindowId) {
|
||||
RefPtr<mozilla::layers::CompositorBridgeParent> cbp = mozilla::layers::
|
||||
CompositorBridgeParent::GetCompositorBridgeParentFromWindowId(aWindowId);
|
||||
if (cbp) {
|
||||
cbp->ScheduleRenderOnCompositorThread();
|
||||
cbp->ScheduleComposition();
|
||||
}
|
||||
}
|
||||
|
||||
static void NotifyDidSceneBuild(RefPtr<layers::CompositorBridgeParent> aBridge,
|
||||
void wr_schedule_render(mozilla::wr::WrWindowId aWindowId) {
|
||||
layers::CompositorThread()->Dispatch(NewRunnableFunction(
|
||||
"NotifyScheduleRender", &NotifyScheduleRender, aWindowId));
|
||||
}
|
||||
|
||||
static void NotifyDidSceneBuild(mozilla::wr::WrWindowId aWindowId,
|
||||
RefPtr<const wr::WebRenderPipelineInfo> aInfo) {
|
||||
aBridge->NotifyDidSceneBuild(aInfo);
|
||||
RefPtr<mozilla::layers::CompositorBridgeParent> cbp = mozilla::layers::
|
||||
CompositorBridgeParent::GetCompositorBridgeParentFromWindowId(aWindowId);
|
||||
if (cbp) {
|
||||
cbp->NotifyDidSceneBuild(aInfo);
|
||||
}
|
||||
}
|
||||
|
||||
void wr_finished_scene_build(mozilla::wr::WrWindowId aWindowId,
|
||||
mozilla::wr::WrPipelineInfo* aInfo) {
|
||||
RefPtr<mozilla::layers::CompositorBridgeParent> cbp = mozilla::layers::
|
||||
CompositorBridgeParent::GetCompositorBridgeParentFromWindowId(aWindowId);
|
||||
RefPtr<wr::WebRenderPipelineInfo> info = new wr::WebRenderPipelineInfo();
|
||||
info->Raw() = std::move(*aInfo);
|
||||
if (cbp) {
|
||||
layers::CompositorThread()->Dispatch(NewRunnableFunction(
|
||||
"NotifyDidSceneBuild", &NotifyDidSceneBuild, cbp, info));
|
||||
}
|
||||
layers::CompositorThread()->Dispatch(NewRunnableFunction(
|
||||
"NotifyDidSceneBuild", &NotifyDidSceneBuild, aWindowId, info));
|
||||
}
|
||||
|
||||
} // extern C
|
||||
|
Loading…
Reference in New Issue
Block a user