mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
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:
parent
ef8d36d208
commit
a02daf7144
8 changed files with 6 additions and 90 deletions
|
@ -2,16 +2,14 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use canvas_traits::{CanvasCommonMsg, CanvasMsg, CanvasPixelData, CanvasData, CanvasWebGLMsg};
|
||||
use canvas_traits::{FromLayoutMsg, FromPaintMsg};
|
||||
use canvas_traits::{CanvasCommonMsg, CanvasMsg, CanvasPixelData, CanvasData, CanvasWebGLMsg, FromLayoutMsg};
|
||||
use euclid::size::Size2D;
|
||||
use gleam::gl;
|
||||
use ipc_channel::ipc::{self, IpcSender, IpcSharedMemory};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use layers::platform::surface::NativeSurface;
|
||||
use offscreen_gl_context::{ColorAttachmentType, GLContext, GLContextAttributes, NativeGLContext};
|
||||
use std::borrow::ToOwned;
|
||||
use std::sync::mpsc::{Sender, channel};
|
||||
use std::sync::mpsc::channel;
|
||||
use util::thread::spawn_named;
|
||||
use util::vec::byte_swap;
|
||||
use webrender_traits;
|
||||
|
@ -93,12 +91,6 @@ impl WebGLPaintThread {
|
|||
painter.send_data(chan),
|
||||
}
|
||||
}
|
||||
CanvasMsg::FromPaint(message) => {
|
||||
match message {
|
||||
FromPaintMsg::SendNativeSurface(chan) =>
|
||||
painter.send_native_surface(chan),
|
||||
}
|
||||
}
|
||||
CanvasMsg::Canvas2d(_) => panic!("Wrong message sent to WebGLThread"),
|
||||
}
|
||||
}
|
||||
|
@ -147,12 +139,6 @@ impl WebGLPaintThread {
|
|||
}
|
||||
}
|
||||
|
||||
fn send_native_surface(&self, _: Sender<NativeSurface>) {
|
||||
// FIXME(ecoal95): We need to make a clone of the surface in order to
|
||||
// implement this
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
fn recreate(&mut self, size: Size2D<i32>) -> Result<(), &'static str> {
|
||||
match self.data {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue