mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
compositor: Move WebRender-ish messages and types to webrender_traits
(#32315)
* Move WebRender related types to `webrender_traits` This refactor moves several WebRender related types from `compositing_traits`, `script_traits` and `net_traits` crates to the `webrender_traits` crate. This change also moves the `Image` type and associated function out of `net_traits` and into the `pixels` crate. Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Move `script_traits::WebrenderIpcSender` to `webrender_traits::WebRenderScriptApi` --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
c2076580f3
commit
2af6fe0b30
53 changed files with 666 additions and 617 deletions
|
@ -16,7 +16,8 @@ use gfx::font_context::FontContext;
|
|||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use log::warn;
|
||||
use webrender_api::{ImageData, ImageDescriptor, ImageKey};
|
||||
use webrender_api::ImageKey;
|
||||
use webrender_traits::ImageUpdate;
|
||||
|
||||
use crate::canvas_data::*;
|
||||
|
||||
|
@ -25,12 +26,6 @@ pub enum AntialiasMode {
|
|||
None,
|
||||
}
|
||||
|
||||
pub enum ImageUpdate {
|
||||
Add(ImageKey, ImageDescriptor, ImageData),
|
||||
Update(ImageKey, ImageDescriptor, ImageData),
|
||||
Delete(ImageKey),
|
||||
}
|
||||
|
||||
pub trait WebrenderApi {
|
||||
/// Attempt to generate an [`ImageKey`], returning `None` in case of failure.
|
||||
fn generate_key(&self) -> Option<ImageKey>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue