mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Speculatively evaluate paint functions during style.
This commit is contained in:
parent
b35791f86f
commit
936dd3ef63
13 changed files with 279 additions and 52 deletions
|
@ -22,11 +22,13 @@ extern crate euclid;
|
|||
extern crate selectors;
|
||||
#[cfg(feature = "servo")] #[macro_use] extern crate serde;
|
||||
#[cfg(feature = "servo")] extern crate webrender_api;
|
||||
#[cfg(feature = "servo")] extern crate servo_atoms;
|
||||
|
||||
#[cfg(feature = "servo")] pub use webrender_api::DevicePixel;
|
||||
|
||||
use cssparser::{CowRcStr, Token};
|
||||
use selectors::parser::SelectorParseError;
|
||||
#[cfg(feature = "servo")] use servo_atoms::Atom;
|
||||
|
||||
/// One hardware pixel.
|
||||
///
|
||||
|
@ -184,3 +186,9 @@ impl ParsingMode {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
/// Speculatively execute paint code in the worklet thread pool.
|
||||
pub trait SpeculativePainter: Send + Sync {
|
||||
/// https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image
|
||||
fn speculatively_draw_a_paint_image(&self, properties: Vec<(Atom, String)>, arguments: Vec<String>);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue