mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
Add a layer to store Pattern related information
Some information of `canvas_data::Pattern` was lost by converting it to `raqote::Source` due to the fact that Raqote did not store this information (e.g. linear gradient's start/end points). We introduce another layer to keep this information for later use (like in `is_zero_size_gradient()`).
This commit is contained in:
parent
1aecf40922
commit
a50aef6f00
2 changed files with 249 additions and 175 deletions
|
@ -358,15 +358,7 @@ pub enum Pattern<'a> {
|
|||
#[cfg(feature = "canvas2d-azure")]
|
||||
Azure(azure::azure_hl::Pattern, PhantomData<&'a ()>),
|
||||
#[cfg(feature = "canvas2d-raqote")]
|
||||
Raqote(raqote::Source<'a>, Option<Repetition>),
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub enum Repetition {
|
||||
Repeat,
|
||||
RepeatX,
|
||||
RepeatY,
|
||||
NoRepeat,
|
||||
Raqote(crate::raqote_backend::Pattern<'a>),
|
||||
}
|
||||
|
||||
pub enum DrawSurfaceOptions {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue