diff options
Diffstat (limited to 'components/shared/constellation/structured_data/mod.rs')
-rw-r--r-- | components/shared/constellation/structured_data/mod.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/components/shared/constellation/structured_data/mod.rs b/components/shared/constellation/structured_data/mod.rs index 81e3849e476..3ea0d78eaf3 100644 --- a/components/shared/constellation/structured_data/mod.rs +++ b/components/shared/constellation/structured_data/mod.rs @@ -10,7 +10,7 @@ mod transferable; use std::collections::HashMap; -use base::id::{BlobId, DomExceptionId, DomPointId, MessagePortId}; +use base::id::{BlobId, DomExceptionId, DomPointId, ImageBitmapId, MessagePortId}; use log::warn; use malloc_size_of_derive::MallocSizeOf; use serde::{Deserialize, Serialize}; @@ -34,6 +34,10 @@ pub struct StructuredSerializedData { pub ports: Option<HashMap<MessagePortId, MessagePortImpl>>, /// Transform streams transferred objects. pub transform_streams: Option<HashMap<MessagePortId, TransformStreamData>>, + /// Serialized image bitmap objects. + pub image_bitmaps: Option<HashMap<ImageBitmapId, SerializableImageBitmap>>, + /// Transferred image bitmap objects. + pub transferred_image_bitmaps: Option<HashMap<ImageBitmapId, SerializableImageBitmap>>, } impl StructuredSerializedData { @@ -42,6 +46,7 @@ impl StructuredSerializedData { field.as_ref().is_some_and(|h| h.is_empty()) } match val { + Transferrable::ImageBitmap => is_field_empty(&self.transferred_image_bitmaps), Transferrable::MessagePort => is_field_empty(&self.ports), Transferrable::ReadableStream => is_field_empty(&self.ports), Transferrable::WritableStream => is_field_empty(&self.ports), |