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:
bors-servo 2020-06-09 19:34:08 -04:00 committed by GitHub
commit 7eacfa4f0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 421 additions and 331 deletions

View file

@ -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() {