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:
Patrick Walton 2015-01-05 19:22:02 -08:00
parent 6b3c05cdd2
commit 15d60d7ea4
20 changed files with 499 additions and 62 deletions

View file

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