aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas_traits/lib.rs
blob: ec510e6281da4810fcb8b8f1d19c5c4ba55441de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */

#![crate_name = "canvas_traits"]
#![crate_type = "rlib"]
#![deny(unsafe_code)]

use crate::canvas::CanvasId;
use crossbeam_channel::Sender;
use euclid::default::Size2D;

#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate malloc_size_of_derive;
#[macro_use]
extern crate serde;

pub mod canvas;
#[macro_use]
pub mod webgl;
mod webgl_channel;

pub enum ConstellationCanvasMsg {
    Create {
        id_sender: Sender<CanvasId>,
        size: Size2D<u64>,
        webrender_sender: webrender_api::RenderApiSender,
        webrender_doc: webrender_api::DocumentId,
        antialias: bool,
    },
    Exit,
}