ruffle/lib/src/backend/render.rs

19 lines
507 B
Rust
Raw Normal View History

2019-04-27 17:54:37 +00:00
pub mod common;
2019-04-27 22:33:47 +00:00
#[cfg(not(target_arch = "wasm32"))]
2019-04-27 01:55:06 +00:00
pub mod glium;
2019-04-27 17:54:37 +00:00
pub mod shape_utils;
#[cfg(target_arch = "wasm32")]
pub mod web_canvas;
use self::common::ShapeHandle;
use crate::{matrix::Matrix, Color};
2019-04-27 01:55:06 +00:00
pub trait RenderBackend {
2019-04-27 17:54:37 +00:00
fn register_shape(&mut self, shape: &swf::Shape) -> common::ShapeHandle;
fn begin_frame(&mut self);
fn clear(&mut self, color: crate::Color);
fn render_shape(&mut self, shape: ShapeHandle, matrix: &Matrix);
fn end_frame(&mut self);
2019-04-27 01:55:06 +00:00
}