Commit dfa2cb5a authored by Andrew Osmond's avatar Andrew Osmond
Browse files

Bug 1704227. r=lsalzman, a=RyanVM

Differential Revision: https://phabricator.services.mozilla.com/D113191
parent 5fa3baef
......@@ -1168,29 +1168,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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment