ruffle/core/src/backend/render.rs

21 lines
514 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-28 06:08:59 +00:00
pub mod null;
2019-04-27 17:54:37 +00:00
pub mod shape_utils;
pub mod web_canvas;
2019-04-28 06:08:59 +00:00
pub use null::NullRenderer;
2019-04-27 17:54:37 +00:00
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);
2019-04-28 06:08:59 +00:00
fn clear(&mut self, color: Color);
2019-04-27 17:54:37 +00:00
fn render_shape(&mut self, shape: ShapeHandle, matrix: &Matrix);
fn end_frame(&mut self);
2019-04-27 01:55:06 +00:00
}