script: Document need for always sending an image update to compositor (#39210)

I hit this many times while working on #38717

Testing: Not needed because we just update the docs

---------

Signed-off-by: Sam <16504129+sagudev@users.noreply.github.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Sam 2025-09-09 10:19:57 +02:00 committed by GitHub
parent ccecb18a9c
commit 1deb7b5957
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -108,6 +108,11 @@ pub(crate) trait CanvasContext {
/// Request that the [`CanvasContext`] update the rendering of its contents,
/// returning `true` if new image was produced.
///
/// Note: If this function returns `true`, script will wait for all images to be updated
/// before updating the rendering again. Be sure that image updates are always sent
/// even in the failure case by sending transparent black image or return `false` in the
/// case of failure.
fn update_rendering(&self, _canvas_epoch: Epoch) -> bool {
false
}