aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_layout_interface/lib.rs
diff options
context:
space:
mode:
authorImanol Fernandez <mortimergoro@gmail.com>2017-08-15 16:05:22 +0200
committerImanol Fernandez <mortimergoro@gmail.com>2017-08-15 22:14:32 +0200
commit703962fe61d673536eb982b45795ae13748f0f6a (patch)
treec85f3cb5d55babab03d56dac8b0d10d588b0a0f9 /components/script_layout_interface/lib.rs
parente9cbbc58cc9655a15bc603effabbd4a4ff62b454 (diff)
downloadservo-703962fe61d673536eb982b45795ae13748f0f6a.tar.gz
servo-703962fe61d673536eb982b45795ae13748f0f6a.zip
Improve WebGL architecture.
Diffstat (limited to 'components/script_layout_interface/lib.rs')
-rw-r--r--components/script_layout_interface/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/components/script_layout_interface/lib.rs b/components/script_layout_interface/lib.rs
index e3e956096bb..7c0f97ef917 100644
--- a/components/script_layout_interface/lib.rs
+++ b/components/script_layout_interface/lib.rs
@@ -43,7 +43,7 @@ pub mod rpc;
pub mod wrapper_traits;
use atomic_refcell::AtomicRefCell;
-use canvas_traits::CanvasMsg;
+use canvas_traits::canvas::CanvasMsg;
use core::nonzero::NonZero;
use ipc_channel::ipc::IpcSender;
use libc::c_void;
@@ -124,8 +124,13 @@ pub enum LayoutElementType {
SVGSVGElement,
}
+pub enum HTMLCanvasDataSource {
+ WebGL(webrender_api::ImageKey),
+ Image(Option<IpcSender<CanvasMsg>>)
+}
+
pub struct HTMLCanvasData {
- pub ipc_renderer: Option<IpcSender<CanvasMsg>>,
+ pub source: HTMLCanvasDataSource,
pub width: u32,
pub height: u32,
}