canvas: Remove all the canvas layerization infrastructure

It was never complete, and with webrender as a backend the way we render
WebGL contexts has changed a bit.

This should remove quite a bit of overhead.
This commit is contained in:
Emilio Cobos Álvarez 2016-03-23 16:29:19 +01:00
parent ef8d36d208
commit a02daf7144
8 changed files with 6 additions and 90 deletions

View file

@ -7,7 +7,6 @@
use app_units::Au;
use azure::AzFloat;
use azure::azure_hl::{BackendType, Color, DrawTarget, SurfaceFormat};
use canvas_traits::CanvasMsg;
use display_list::{DisplayItem, DisplayList, DisplayListEntry, DisplayListTraversal};
use display_list::{LayerInfo, StackingContext, StackingContextId, StackingContextType};
use euclid::Matrix4;
@ -343,7 +342,6 @@ pub enum Msg {
#[derive(Deserialize, Serialize)]
pub enum LayoutToPaintMsg {
PaintInit(Epoch, Arc<DisplayList>),
CanvasLayer(LayerId, IpcSender<CanvasMsg>),
Exit(IpcSender<()>),
}
@ -379,9 +377,6 @@ pub struct PaintThread<C> {
/// Communication handles to each of the worker threads.
worker_threads: Vec<WorkerThreadProxy>,
/// A map to track the canvas specific layers
canvas_map: HashMap<LayerId, IpcSender<CanvasMsg>>,
}
// If we implement this as a function, we get borrowck errors from borrowing
@ -431,7 +426,6 @@ impl<C> PaintThread<C> where C: PaintListener + Send + 'static {
paint_permission: false,
current_epoch: None,
worker_threads: worker_threads,
canvas_map: HashMap::new()
};
let reporter_name = format!("paint-reporter-{}", id);
@ -475,11 +469,6 @@ impl<C> PaintThread<C> where C: PaintListener + Send + 'static {
self.initialize_layers();
}
}
// Inserts a new canvas renderer to the layer map
Msg::FromLayout(LayoutToPaintMsg::CanvasLayer(layer_id, canvas_renderer)) => {
debug!("Renderer received for canvas with layer {:?}", layer_id);
self.canvas_map.insert(layer_id, canvas_renderer);
}
Msg::FromChrome(ChromeToPaintMsg::Paint(requests, frame_tree_id)) => {
if self.paint_permission && self.root_display_list.is_some() {
let mut replies = Vec::new();