servo/components/gfx
bors-servo ad53e95080 Auto merge of #6083 - ecoal95:layerize-canvas, r=pcwalton
I've done a bit of job to get this done. Right now readback is still used, but we have a `LayerId` -> `CanvasRenderer` map on the paint task, that we can use to get rid of that.

I'd want review, to see if this is a good approach (I know it's not the initial `CanvasId` -> renderer approach, but it's pretty similar, since a canvas involves a `PaintLayer`).

I had to do a bit of refactoring to avoid cyclic dependencies between canvas and gfx. I'd want you to review them too.

It's mergeable and doesn't break any tests :P

Some of my main concerns:
* Does the canvas render really need to be behind an `Arc<Mutex<T>>`?
* I can't clone a `NativeSurface` right now (that's why the `SendNativeSurface()` msg is unimplemented in the WebGL task). It should be easy to add that to rust-layers, supposing the caller is responsible to mark it as non-leaking, any reason to not do it?

cc @jdm @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6083)
<!-- Reviewable:end -->
2015-05-20 15:42:06 -05:00
..
display_list layout: Minor whitespace and formatting cleanups. 2015-05-13 12:00:55 -07:00
platform Avoid selecting bitmap fonts from fontconfig 2015-05-19 21:10:04 -04:00
text Rename Au methods with f32/f64 instead of frac32/frac/subpx 2015-05-05 18:23:29 +02:00
buffer_map.rs Stop using IndexMut on HashMap. 2015-05-01 21:16:22 +02:00
Cargo.toml Layerize canvas 2015-05-20 19:10:50 +02:00
filters.rs Rename Au methods with f32/f64 instead of frac32/frac/subpx 2015-05-05 18:23:29 +02:00
font.rs Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
font_cache_task.rs Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
font_context.rs Remove unused imports. 2015-05-06 19:20:10 +02:00
font_template.rs Remove some as_slice calls. 2015-04-24 17:44:47 +02:00
lib.rs Layerize canvas 2015-05-20 19:10:50 +02:00
paint_context.rs Layerize canvas 2015-05-20 19:10:50 +02:00
paint_task.rs Layerize canvas 2015-05-20 19:10:50 +02:00