mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
layout: Implement filter
per CSS-FILTERS § 5.
`blur` and `drop-shadow` are not yet supported, because the `text-shadow` PR makes some fundamental changes to blur rendering that are needed first.
This commit is contained in:
parent
6b3c05cdd2
commit
15d60d7ea4
20 changed files with 499 additions and 62 deletions
|
@ -56,8 +56,7 @@ impl CanvasPaintTask {
|
|||
|
||||
fn fill_rect(&self, rect: &Rect<f32>) {
|
||||
let drawopts = DrawOptions::new(1.0, 0);
|
||||
self.drawtarget.fill_rect(rect, PatternRef::ColorPatternRef(&self.fill_color),
|
||||
Some(&drawopts));
|
||||
self.drawtarget.fill_rect(rect, PatternRef::Color(&self.fill_color), Some(&drawopts));
|
||||
}
|
||||
|
||||
fn clear_rect(&self, rect: &Rect<f32>) {
|
||||
|
@ -70,7 +69,7 @@ impl CanvasPaintTask {
|
|||
}
|
||||
|
||||
fn create(size: Size2D<i32>) -> DrawTarget {
|
||||
DrawTarget::new(BackendType::SkiaBackend, size, SurfaceFormat::B8G8R8A8)
|
||||
DrawTarget::new(BackendType::Skia, size, SurfaceFormat::B8G8R8A8)
|
||||
}
|
||||
|
||||
fn recreate(&mut self, size: Size2D<i32>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue