Skip to content

Fetch current_epoch via render_api#4877

Draft
shubhamg13 wants to merge 1 commit into
servo:0.68from
shubhamg13:sync_request_current_epoch
Draft

Fetch current_epoch via render_api#4877
shubhamg13 wants to merge 1 commit into
servo:0.68from
shubhamg13:sync_request_current_epoch

Conversation

@shubhamg13
Copy link
Copy Markdown
Member

@shubhamg13 shubhamg13 commented Dec 22, 2025

This PR targets to access the Scene's PipelineInfo using render_api.

Aiming render_api as only interface used to communicate with WebRender.
As of now render_api is already being used for most of communication except this one (and update ).

In this PR

  1. pipeline_info is moved to SceneBuilderThread along with removed_pipelines.
  2. Connecting PublishPipelineInfo to SceneBuilerThread.
  3. Along with making this pipeline_info synchronous as earlier we need to rely on calling of renderer.update() to PublishPipelineInfo. Now using event loop of SceneBuilerThread it is synchronous.

Add-ons
4. FlushPipelineInfo is also connected to SceneBuilerThread as required.

@shubhamg13 shubhamg13 force-pushed the sync_request_current_epoch branch from bef2bd2 to caad7a6 Compare December 22, 2025 09:00
@shubhamg13 shubhamg13 marked this pull request as draft December 22, 2025 13:34
@shubhamg13 shubhamg13 force-pushed the sync_request_current_epoch branch 5 times, most recently from d35bbfe to 596f3f3 Compare December 24, 2025 01:35
@shubhamg13 shubhamg13 marked this pull request as ready for review December 24, 2025 01:36
@shubhamg13 shubhamg13 force-pushed the sync_request_current_epoch branch from 596f3f3 to 92f36fd Compare December 24, 2025 01:45
@shubhamg13
Copy link
Copy Markdown
Member Author

shubhamg13 commented Jan 5, 2026

@mrobinson @xiaochengh Please take a look.

Copy link
Copy Markdown
Member

@yezhizhen yezhizhen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix the CI first. Can you explain the motivation of "synchronous", and how is it achieved?

@shubhamg13 shubhamg13 force-pushed the sync_request_current_epoch branch from 92f36fd to 7d2e592 Compare January 7, 2026 02:37
@shubhamg13
Copy link
Copy Markdown
Member Author

Let's fix the CI first. Can you explain the motivation of "synchronous", and how is it achieved?

Please run the workflow again. I updated the PR description. PTAL.

@shubhamg13 shubhamg13 requested a review from yezhizhen January 7, 2026 02:46
@yezhizhen yezhizhen requested a review from mrobinson January 7, 2026 03:42
@xiaochengh
Copy link
Copy Markdown

Could you elaborate on the motivation of this PR?

Why do we prefer a sync api over an async one? Is there any issue with the current async API? Or do you just want to make it easier to call (which on its own might not justify the change though...)?

@shubhamg13 shubhamg13 changed the title Synchronously requests current epoch via render_api Fetch current_epoch via render_api Jan 9, 2026
@shubhamg13
Copy link
Copy Markdown
Member Author

Could you elaborate on the motivation of this PR?

Why do we prefer a sync api over an async one? Is there any issue with the current async API? Or do you just want to make it easier to call (which on its own might not justify the change though...)?

I updated the PR description. Please take a look.

@mrobinson
Copy link
Copy Markdown
Member

I'm also curious about the motivations here. I don't really great about making large architectural changes to WebRender. It's better to have fewer changes on top of the upstream version. The exception is for solving a problem that we are encountering. In that case, we should discuss with the folks at Mozilla about making our changes upstream or look at reworking the code in Servo.

@mrobinson mrobinson force-pushed the 0.68 branch 2 times, most recently from bfd0b6b to 8c1bfc3 Compare January 28, 2026 10:33
Copy link
Copy Markdown
Member

@mrobinson mrobinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding this change: we try to keep our modifications to WebRender as minimal as possible and limited just to things that Servo needs. If you feel like this could be generally useful, a good step might be to submit it upstream to the Gecko repository and see if it's something that also makes sense for Firefox as well. If it lands upstream, it will also be available the next time we re-sync WebRender with upstream.

@shubhamg13 shubhamg13 marked this pull request as draft February 26, 2026 04:04
@shubhamg13 shubhamg13 force-pushed the sync_request_current_epoch branch 3 times, most recently from 4739d43 to d14aafe Compare March 4, 2026 08:30
Signed-off-by: Shubham Gupta <shubham.gupta@chromium.org>
@shubhamg13 shubhamg13 force-pushed the sync_request_current_epoch branch from d14aafe to dcba2bb Compare March 4, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants