diff options
author | Glenn Watson <gw@intuitionlibrary.com> | 2016-02-18 07:57:31 +1000 |
---|---|---|
committer | Glenn Watson <gw@intuitionlibrary.com> | 2016-02-18 10:35:29 +1000 |
commit | c0531c312fdb0783e4d121b4c2d7f15d4f5cdc1f (patch) | |
tree | ced94496eb3f3b4149f1c2d3b0b02422bb3b5471 /components/compositing/pipeline.rs | |
parent | f7f0eea47035f4316d09db26315bf8ebb72637c9 (diff) | |
download | servo-c0531c312fdb0783e4d121b4c2d7f15d4f5cdc1f.tar.gz servo-c0531c312fdb0783e4d121b4c2d7f15d4f5cdc1f.zip |
Add WebRender integration to Servo.
WebRender is an experimental GPU accelerated rendering backend for Servo.
The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).
WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
Diffstat (limited to 'components/compositing/pipeline.rs')
-rw-r--r-- | components/compositing/pipeline.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs index 2a4e3b1999e..bbf892048c8 100644 --- a/components/compositing/pipeline.rs +++ b/components/compositing/pipeline.rs @@ -35,6 +35,7 @@ use util::geometry::{PagePx, ViewportPx}; use util::ipc::OptionalIpcSender; use util::opts::{self, Opts}; use util::prefs; +use webrender_traits; /// A uniquely-identifiable pipeline of script thread, layout thread, and paint thread. pub struct Pipeline { @@ -113,6 +114,8 @@ pub struct InitialPipelineState { pub load_data: LoadData, /// The ID of the pipeline namespace for this script thread. pub pipeline_namespace_id: PipelineNamespaceId, + /// Optional webrender api (if enabled). + pub webrender_api_sender: Option<webrender_traits::RenderApiSender>, } impl Pipeline { @@ -225,6 +228,7 @@ impl Pipeline { layout_content_process_shutdown_port: layout_content_process_shutdown_port, script_content_process_shutdown_chan: script_content_process_shutdown_chan, script_content_process_shutdown_port: script_content_process_shutdown_port, + webrender_api_sender: state.webrender_api_sender, }; let privileged_pipeline_content = PrivilegedPipelineContent { @@ -376,6 +380,7 @@ pub struct UnprivilegedPipelineContent { layout_content_process_shutdown_port: IpcReceiver<()>, script_content_process_shutdown_chan: IpcSender<()>, script_content_process_shutdown_port: IpcReceiver<()>, + webrender_api_sender: Option<webrender_traits::RenderApiSender>, } impl UnprivilegedPipelineContent { @@ -419,7 +424,8 @@ impl UnprivilegedPipelineContent { self.time_profiler_chan, self.mem_profiler_chan, self.layout_shutdown_chan, - self.layout_content_process_shutdown_chan.clone()); + self.layout_content_process_shutdown_chan.clone(), + self.webrender_api_sender); if wait_for_completion { self.script_content_process_shutdown_port.recv().unwrap(); |