Conversation
For a long time, the "Compositor" hasn't done any compositing. This is handled by WebRender. In addition the "Compositor" does many other tasks. This change renames `IOCompositor` to `Paint`. `Paint` is Servo's paint subsystem and contains multiple `Painter`s. This change does not rename the crate; that will be done in a followup change. Signed-off-by: Martin Robinson <[email protected]>
components/compositing/paint.rs
Outdated
| /// Once the frame is ready the [`Painter`] for the WebRender instance will ask libservo | ||
| /// to inform the embedder that a new frame is ready so that it can trigger a paint. | ||
| /// 3. Drive animation and animation callback updates. Animation updates should ideally be | ||
| /// coordinated with the system vscync signal, so the `RefreshDriver` is exposed in the |
There was a problem hiding this comment.
| /// coordinated with the system vscync signal, so the `RefreshDriver` is exposed in the | |
| /// coordinated with the system vsync signal, so the `RefreshDriver` is exposed in the |
components/compositing/painter.rs
Outdated
| ); | ||
| let _span = | ||
| profile_traits::trace_span!("ScriptToCompositorMsg::BuiltDisplayList",).entered(); | ||
| let _span = profile_traits::trace_span!("PaintMessage::BuiltDisplayList",).entered(); |
There was a problem hiding this comment.
| let _span = profile_traits::trace_span!("PaintMessage::BuiltDisplayList",).entered(); | |
| let _span = profile_traits::trace_span!("PaintMessage::SendDisplayList",).entered(); |
PaintMessage doesn't have a BuiltDisplayList variant.
| //! | ||
| //! * The script thread. | ||
| //! * The graphics compositor. | ||
| //! * The `Paint` subsystem, which runs in the embedder main thread. |
There was a problem hiding this comment.
| //! * The `Paint` subsystem, which runs in the embedder main thread. | |
| //! * The `Paint` subsystem, which runs in the embedder's main thread. |
There was a problem hiding this comment.
Also, I think on Android and OHOS we don't run the compositor on the main thread.
There was a problem hiding this comment.
I've modified this to read The Paintsubsystem, which runs in the same thread as theServo instance..
components/script/script_thread.rs
Outdated
| // Do not handle events if the BC has been, or is being, discarded | ||
| if document.window().Closed() { | ||
| warn!("Compositor event sent to a pipeline with a closed window {pipeline_id}."); | ||
| warn!("Paint event sent to a pipeline with a closed window {pipeline_id}."); |
There was a problem hiding this comment.
| warn!("Paint event sent to a pipeline with a closed window {pipeline_id}."); | |
| warn!("Input event sent to a pipeline with a closed window {pipeline_id}."); |
"Paint event" doesn't match the change to the method's documentation.
components/script/script_thread.rs
Outdated
| ) { | ||
| let Some(document) = self.documents.borrow().find_document(pipeline_id) else { | ||
| warn!("Compositor event sent to closed pipeline {pipeline_id}."); | ||
| warn!("Paint event sent to closed pipeline {pipeline_id}."); |
There was a problem hiding this comment.
| warn!("Paint event sent to closed pipeline {pipeline_id}."); | |
| warn!("Input event sent to closed pipeline {pipeline_id}."); |
|
|
||
| /// A tree of spatial nodes, which mirrors the spatial nodes in the WebRender | ||
| /// display list, except these are used to scrolling in the compositor so that | ||
| /// display list, except these are used to scrolling in `Paint` so that |
There was a problem hiding this comment.
| /// display list, except these are used to scrolling in `Paint` so that | |
| /// display list, except these are used for scrolling in `Paint` so that |
| /// [`CrossProcessCompositorApi`] for communicating with the compositor. | ||
| pub compositor_api: CrossProcessCompositorApi, | ||
| /// [`CrossProcessPaintApi`] for communicating with `Paint`. | ||
| pub paint_aip: CrossProcessPaintApi, |
There was a problem hiding this comment.
| pub paint_aip: CrossProcessPaintApi, | |
| pub paint_api: CrossProcessPaintApi, |
components/shared/profile/time.rs
Outdated
| /// `Paint` is rasterising or presenting. | ||
| /// | ||
| /// Not associated with a specific URL. | ||
| Compositing = 0x00, |
There was a problem hiding this comment.
| Compositing = 0x00, | |
| Painting = 0x00, |
Not sure if this enum variant needs a rename or you plan to address it in a subsequent patch.
|
@mukilan Thanks for the review. I think I've addressed all your comments. |
components/shared/profile/time.rs
Outdated
| pub const fn variant_name(&self) -> &'static str { | ||
| match self { | ||
| ProfilerCategory::Compositing => "Compositing", | ||
| ProfilerCategory::Painting => "Compositing", |
There was a problem hiding this comment.
| ProfilerCategory::Painting => "Compositing", | |
| ProfilerCategory::Painting => "Painting", |
Signed-off-by: Martin Robinson <[email protected]>
1ee154c to
52013fa
Compare
For a long time, the "Compositor" hasn't done any compositing. This is
handled by WebRender. In addition the "Compositor" does many other
tasks. This change renames
IOCompositortoPaint.Paintis Servo's paint subsystem and contains multiplePainters.This change does not rename the crate; that will be done in a
followup change.
Testing: This just renames types and updates comments, so no new tests are necessary.