diff options
author | Glenn Watson <github@intuitionlibrary.com> | 2016-10-12 10:13:27 +1000 |
---|---|---|
committer | Glenn Watson <github@intuitionlibrary.com> | 2016-10-18 10:21:27 +1000 |
commit | acfdfd2fa98562c9f891fbee2dbc3424803c1a3c (patch) | |
tree | bc66667bab89db2ab6a1c4d4113525190fb82d3a /components/script/dom/canvasrenderingcontext2d.rs | |
parent | 4af21e3ae1676f943a9a01688fef854487bcddfc (diff) | |
download | servo-acfdfd2fa98562c9f891fbee2dbc3424803c1a3c.tar.gz servo-acfdfd2fa98562c9f891fbee2dbc3424803c1a3c.zip |
Remove old rendering backend.
This removes paint threads, rust-layers dependency, and changes
optional webrender types to be required.
The use_webrender option has been removed, however I've left
the "-w" command line option in place so that wpt
runner can continue to pass that. Once it's removed from there
we can also remove the -w option.
Once this stage is complete, it should be fine to change the
display list building code to generate webrender display
lists directly and avoid the conversion step.
Diffstat (limited to 'components/script/dom/canvasrenderingcontext2d.rs')
-rw-r--r-- | components/script/dom/canvasrenderingcontext2d.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/components/script/dom/canvasrenderingcontext2d.rs b/components/script/dom/canvasrenderingcontext2d.rs index 5ddf6cda2ea..5b36249be59 100644 --- a/components/script/dom/canvasrenderingcontext2d.rs +++ b/components/script/dom/canvasrenderingcontext2d.rs @@ -5,7 +5,7 @@ use canvas_traits::{Canvas2dMsg, CanvasCommonMsg, CanvasMsg}; use canvas_traits::{CompositionOrBlending, FillOrStrokeStyle, FillRule}; use canvas_traits::{LineCapStyle, LineJoinStyle, LinearGradientStyle}; -use canvas_traits::{RadialGradientStyle, RepetitionStyle, byte_swap, byte_swap_and_premultiply}; +use canvas_traits::{RadialGradientStyle, RepetitionStyle, byte_swap_and_premultiply}; use cssparser::{Parser, RGBA}; use cssparser::Color as CSSColor; use dom::bindings::cell::DOMRefCell; @@ -47,7 +47,6 @@ use std::cell::Cell; use std::str::FromStr; use unpremultiplytable::UNPREMULTIPLY_TABLE; use url::Url; -use util::opts; #[must_root] #[derive(JSTraceable, Clone, HeapSizeOf)] @@ -297,14 +296,7 @@ impl CanvasRenderingContext2D { Some((mut data, size)) => { // Pixels come from cache in BGRA order and drawImage expects RGBA so we // have to swap the color values - if opts::get().use_webrender { - // Webrender doesn't pre-multiply alpha when decoding - // images, but canvas expects the images to be - // pre-multiplied alpha. - byte_swap_and_premultiply(&mut data); - } else { - byte_swap(&mut data); - } + byte_swap_and_premultiply(&mut data); let size = Size2D::new(size.width as f64, size.height as f64); (data, size) }, |