mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #26823 - jdm:single-renderapi, r=asajeffrey
Update webrender These changes reflect changes in webrender's API that make RenderApiSender and RenderApi objects more challenging to share. This PR moves us to a model where: * the compositor owns the main RenderApi object * other threads that need to create transactions or manipulate fonts proxy those operations to the compositor (script/layout use IPC, while other threads use non-IPC channels) * the webgl thread owns its own independent RenderApi
This commit is contained in:
commit
7eacfa4f0d
51 changed files with 421 additions and 331 deletions
|
@ -213,7 +213,10 @@ impl VideoFrameRenderer for MediaFrameRenderer {
|
|||
Some((ref mut image_key, ref mut width, ref mut height)) => {
|
||||
self.old_frame = Some(*image_key);
|
||||
|
||||
let new_image_key = self.api.generate_image_key();
|
||||
let new_image_key = match self.api.generate_image_key() {
|
||||
Ok(key) => key,
|
||||
Err(()) => return,
|
||||
};
|
||||
|
||||
/* update current_frame */
|
||||
*image_key = new_image_key;
|
||||
|
@ -243,7 +246,10 @@ impl VideoFrameRenderer for MediaFrameRenderer {
|
|||
updates.push(ImageUpdate::AddImage(new_image_key, descriptor, image_data));
|
||||
},
|
||||
None => {
|
||||
let image_key = self.api.generate_image_key();
|
||||
let image_key = match self.api.generate_image_key() {
|
||||
Ok(key) => key,
|
||||
Err(()) => return,
|
||||
};
|
||||
self.current_frame = Some((image_key, frame.get_width(), frame.get_height()));
|
||||
|
||||
let image_data = if frame.is_gl_texture() && self.player_id.is_some() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue