Compositor: add document id to NewWebRenderFrame variant (#33597)

* Add document id to NewWebRenderFrame variant

Signed-off-by: Wu Wayne <yuweiwu@pm.me>

* Match the arguments order

Signed-off-by: Wu Wayne <yuweiwu@pm.me>

---------

Signed-off-by: Wu Wayne <yuweiwu@pm.me>
This commit is contained in:
Ngo Iok Ui (Wu Yu Wei) 2024-10-02 16:34:15 +09:00 committed by GitHub
parent e534c7d461
commit 88dad77483
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 9 deletions

View file

@ -22,6 +22,7 @@ use script_traits::{
};
use style_traits::CSSPixel;
use webrender_api::units::{DeviceIntPoint, DeviceIntSize, DeviceRect};
use webrender_api::DocumentId;
use webrender_traits::{
CanvasToCompositorMsg, FontToCompositorMsg, NetToCompositorMsg, ScriptToCompositorMsg,
};
@ -93,8 +94,9 @@ pub enum CompositorMsg {
/// Set whether to use less resources by stopping animations.
SetThrottled(PipelineId, bool),
/// WebRender has produced a new frame. This message informs the compositor that
/// the frame is ready, so that it may trigger a recomposite.
NewWebRenderFrameReady(bool /* composite_needed */),
/// the frame is ready. It contains a bool to indicate if it needs to composite and the
/// `DocumentId` of the new frame.
NewWebRenderFrameReady(DocumentId, bool),
/// A pipeline was shut down.
// This message acts as a synchronization point between the constellation,
// when it shuts down a pipeline, to the compositor; when the compositor