mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +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
|
@ -15,12 +15,11 @@ use gfx_traits::color;
|
|||
use ipc_channel::ipc::IpcSharedMemory;
|
||||
use ipc_channel::ipc::{self, IpcSender};
|
||||
use ipc_channel::router::ROUTER;
|
||||
use layers::platform::surface::NativeSurface;
|
||||
use num::ToPrimitive;
|
||||
use premultiplytable::PREMULTIPLY_TABLE;
|
||||
use std::borrow::ToOwned;
|
||||
use std::mem;
|
||||
use std::sync::mpsc::{Sender, channel};
|
||||
use std::sync::mpsc::channel;
|
||||
use util::opts;
|
||||
use util::thread::spawn_named;
|
||||
use util::vec::byte_swap;
|
||||
|
@ -205,13 +204,6 @@ impl<'a> CanvasPaintThread<'a> {
|
|||
}
|
||||
}
|
||||
}
|
||||
CanvasMsg::FromPaint(message) => {
|
||||
match message {
|
||||
FromPaintMsg::SendNativeSurface(chan) => {
|
||||
painter.send_native_surface(chan)
|
||||
}
|
||||
}
|
||||
}
|
||||
CanvasMsg::WebGL(_) => panic!("Wrong message sent to Canvas2D thread"),
|
||||
}
|
||||
}
|
||||
|
@ -550,12 +542,6 @@ impl<'a> CanvasPaintThread<'a> {
|
|||
})
|
||||
}
|
||||
|
||||
fn send_native_surface(&self, _chan: Sender<NativeSurface>) {
|
||||
// FIXME(mrobinson): We need a handle on the NativeDisplay to create compatible
|
||||
// NativeSurfaces for the compositor.
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
fn image_data(&self,
|
||||
dest_rect: Rect<i32>,
|
||||
canvas_size: Size2D<f64>,
|
||||
|
|
|
@ -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