mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Use ByteBuf for the canvas messages
The type Vec<u8> is super unefficient to work with in Serde if all you want to represent is a simple blob.
This commit is contained in:
parent
3ce3f39383
commit
ce81420bef
19 changed files with 170 additions and 62 deletions
|
@ -35,6 +35,7 @@ use ipc_channel::ipc::IpcSender;
|
|||
use profile_traits::ipc;
|
||||
use script_runtime::CommonScriptMsg;
|
||||
use script_runtime::ScriptThreadEventCategory::WebVREvent;
|
||||
use serde_bytes::ByteBuf;
|
||||
use std::cell::Cell;
|
||||
use std::mem;
|
||||
use std::ops::Deref;
|
||||
|
@ -68,7 +69,7 @@ pub struct VRDisplay {
|
|||
// Compositor VRFrameData synchonization
|
||||
frame_data_status: Cell<VRFrameDataStatus>,
|
||||
#[ignore_malloc_size_of = "closures are hard"]
|
||||
frame_data_receiver: DomRefCell<Option<WebGLReceiver<Result<Vec<u8>, ()>>>>,
|
||||
frame_data_receiver: DomRefCell<Option<WebGLReceiver<Result<ByteBuf, ()>>>>,
|
||||
running_display_raf: Cell<bool>,
|
||||
paused: Cell<bool>,
|
||||
stopped_on_pause: Cell<bool>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue