Commit graph

54 commits

Author SHA1 Message Date
bors-servo
44c4bb00c1 Auto merge of #7053 - connorimes:move-net-error-list, r=mbrubeck
Move net_error_list from net to net_traits. Fixes #7050.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7053)
<!-- Reviewable:end -->
2015-08-07 01:55:20 -06:00
Connor Imes
b526214a3d Move net_error_list from net to net_traits. Fixes #7050. 2015-08-06 16:37:08 -05:00
David Rajchenbach-Teller
d2a3a68170 Resolves #5478 - use std::process::exit instead of lib::exit in constellation.rs 2015-08-06 12:10:26 +02:00
Patrick Walton
bb99b2f3c8 script: Make most of 2D canvas and WebGL run over IPC.
To actually make the multiprocess communication work, we'll need to
reroute the task creation to the pipeline or the compositor. But this
works as a first step.
2015-07-25 00:50:12 -07:00
Martin Robinson
1aedead955 Have BufferMap store NativeSurfaces and rename to SurfaceMap
We currently store LayerBuffers, because previously NativeSurfaces did
not record their own size. Now we can store NativeSurfaces directly,
which saves a bit of space in the surface cache and allows us to create
LayerBuffers only in the PaintTask.

This also means that instead of sending cached LayerBuffers, the
compositor can just send cached NativeSurfaces to the PaintTask.
2015-07-24 11:12:39 -07:00
Martin Robinson
900337e3d1 Add memory profiling for the compositor task
Currently only the BufferMap is recorded, but a later change will also
measure the memory usage of the compositor tree.
2015-07-16 16:08:34 -07:00
Patrick Walton
e841065351 compositing: Move messages that go over the ScriptListener to go over
an IPC channel instead.

Because this used a boxed trait object to invoke messages across a
process boundary, and boxed trait objects are not supported across IPC,
we spawn a helper thread inside the compositor to perform the marshaling
for us.
2015-07-14 12:12:19 -07:00
Martin Robinson
e115c3d3c4 Move LayerBuffer cache to the compositor
Now that NativeDisplay can be shared between the compositor and the
paint task, we can move the LayerBuffer cache to the compositor. This
allows surfaces to be potentially reused between different paint tasks
and will eventually allow OpenGL contexts to be preserved between
instances of GL rasterization.
2015-07-08 08:05:11 -07:00
Ms2ger
73a7e92bfd Update to rustc 2d0cbf3e3e25e092bd9e4c94d08e446b680869f0. 2015-06-25 20:02:36 +02:00
ecoal95
8cbfb3482c Use euclid from crates.io 2015-06-19 00:04:24 +02:00
Eduard Burtescu
00e8e5f77d Use the correct log crate and setup env_logger in main. 2015-06-06 23:20:40 +03:00
James Graham
49f1b13ad9 Add support for switching frames with the webdriver API.
This moves webdriver_traits into msg to avoid a circular dependency.
2015-06-01 23:18:55 +01:00
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
Patrick Walton
0098d9e9e8 compositing: Support multiple events per frame.
Improves scrolling performance on Mac.
2015-05-20 10:53:48 -07:00
ecoal95
3350522306 Layerize canvas
Note that this keeps using readback right now, `NativeSurface` painting
will be implemented soon.

Also see https://github.com/servo/servo/issues/6142
2015-05-20 19:10:50 +02:00
Glenn Watson
2b3737d34e Various fixes for cleaning up iframes, compositor layers, pipelines and threads.
This allows most of the jquery test suite to run without exhausting thread resources.
2015-05-14 11:42:54 +10:00
James Gilbertson
138596e861 Constrain the viewport & zoom when reflowing 2015-05-06 00:34:33 -06:00
Simon Sapin
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
Nicholas Nethercote
092507d23c Add a profile_traits crate to reduce compile times.
A rebuild after touching components/profile/mem.rs now takes 48 seconds (and
only rebuilds `profile` and `servo`) which is much lower than it used to be.
In comparison, a rebuild after touching components/profile_traits/mem.rs takes
294 seconds and rebuilds many more crates.

This change also removes some unnecessary crate dependencies in `net` and
`net_traits`.
2015-04-30 17:58:47 -07:00
James Graham
c2fc6e311a Add script execution support via WebDriver 2015-04-23 16:14:27 +01:00
Avi Weinstock
503cc9e6d6 Moved clipboard integration from textinput to constellation, to facilitate sandboxing. 2015-04-21 09:31:20 -04:00
James Graham
009e2baaf0 Add enough Webdriver support to enable Get().
This is incomplete in several ways:

* It assumes that there's only one constellation (i.e. top level browsing context), ever.
* The session support is very basic indeed (no capabilities)
* Passing channels over channels may not sit well with IPC
* The error handling is mostly missing
2015-04-16 16:02:43 +01:00
Gilles Leblanc
ba36a108c1 Split out shared networking code into net_traits crate
Fixes #4476
2015-04-03 13:38:10 -04:00
Ms2ger
8e0ce3d14f Stop using int/uint in compositing. 2015-04-03 01:24:48 +02:00
Ms2ger
89ce2216fd Use the new io's stderr handle to write out the hard-fail warning. 2015-03-28 18:10:38 +01:00
Ms2ger
b5bc73f5cb Stop using old_path in compositing. 2015-03-26 08:59:16 +01:00
Nicholas Nethercote
52447ccd9b Move profiler code from util into a new crate profile.
- Most of util::memory has been moved into profile::mem, though the
  `SizeOf` trait and related things remain in util::memory. The
  `SystemMemoryReporter` code is now in a submodule
  profile::mem::system_reporter.

- util::time has been moved entirely into profile::time.
2015-03-24 02:09:31 -07:00
Ms2ger
2755ed6c58 Remove allow(missing_copy_implementations) attributes.
This is now the default.
2015-03-23 10:49:44 +01:00
Simon Sapin
6a58cbd118 Fix more warnings everywhere. 2015-03-18 22:11:20 +01:00
Ms2ger
895d1ec10a Move compositing to libc from crates.io. 2015-02-21 00:24:58 +01:00
Ms2ger
dda12e196b Fix warnings in compositing. 2015-02-13 10:36:48 +01:00
Simon Sapin
d5dd1d658e Upgrade to rustc ba2f13ef0 2015-02-04 2015-02-11 14:48:34 -08:00
Ms2ger
a09a912178 Import net as net rather than servo_net. 2015-02-10 12:55:24 +01:00
Ms2ger
b2fcc2397e Import msg as msg rather than servo_msg. 2015-02-10 11:40:36 +01:00
Josh Matthews
446f0f447e Allow unused variables, imports, and mutable. 2015-02-09 17:41:57 -05:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
bors-servo
0793137631 auto merge of #4575 : mttr/servo/warnings, r=jdm
Notes:

* This adds `#![allow(missing_copy_implementations)]` to components/*/lib.rs. I'm not sure how to approach the missing Copy warnings (are there things for which Copy should NOT be implemented, and how can I tell?) so I stuck this in to make life easier when looking through the warnings. I can easily remove this if necessary. 
* This leaves the following type of warnings, which I couldn't figure out how to approach (I'll investigate it later if no one else wants to).
```
css/matching.rs:72:23: 72:35 warning: use of deprecated item: Use overloaded core::cmp::PartialEq, #[warn(deprecated)] on by default
css/matching.rs:72         this_as_query.equiv(other)
                                         ^~~~~~~~~~~~
css/matching.rs:95:10: 95:49 warning: use of deprecated item: Use overloaded core::cmp::PartialEq, #[warn(deprecated)] on by default
css/matching.rs:95 impl<'a> Equiv<ApplicableDeclarationsCacheEntry> for ApplicableDeclarationsCacheQuery<'a> {
```
2015-01-08 16:03:55 -07:00
Matthew Rasmus
a3fc3a1581 Allow missing_copy_implementations 2015-01-08 08:51:11 -08:00
Ms2ger
5f31da82bd Remove if_let feature gates.
This feature is now supported unconditionally.
2015-01-08 17:26:06 +01:00
Ms2ger
04eb923da9 Remove dependencies on the native crate. 2015-01-04 16:28:02 +01:00
Ms2ger
fbf257f878 Remove obsolete attributes. 2015-01-03 10:06:17 +01:00
Martin Robinson
c0b397322f Stall PaintTask exit until it can release all buffers
It is possible for a PaintTask to start exiting soon after sending new
buffers to the compositor. In that case, the compositor should return
the now unnecessary buffers to the PaintTask so that it can properly
free them.

To accomplish this, the compositor now keeps a hash map of paint task
channels per pipeline id. When a PaintTask exists, the constellation
informs the compositor that it can forget about it. Additionally, the
PaintTask should not wait for any buffers when the engine is doing a
complete shutdown. In that case, the compositor is already halted and
has simply let all buffers leak. We pipe through the shutdown type when
destroying the pipeline to make this decision.

Fixes #2641.
2015-01-02 15:20:32 -08:00
Glenn Watson
c39852a3f4 Remove rust-alert as it's broken on mac, and unimplemented on other platforms. 2014-11-19 14:19:40 +10:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Patrick Walton
10f7b49cf7 Invert control flow, fix resizing, and improve checkerboarding
significantly by giving tiles some time to paint before we render
unrendered content.
2014-11-04 13:51:56 -08:00
Glenn Watson
69c5bc8fca Update to use new GL bindings. 2014-10-30 15:31:10 +10:00
Martin Robinson
80a6f3a732 Move compositor_data.rs to compositor_layer.rs.
The new name better reflects the majority of the code in the file.
2014-10-28 08:33:23 -07:00
Martin Robinson
c0fa32e7aa Combine events and CompositorData methods into CompositorLayer
This is a more natural collection of methods, as they all operate
directly on layers and accept a layer as their first argument.
2014-10-28 08:33:23 -07:00
Matt Brubeck
77d32ee447 Move windowing code out of the compositor
This is mainly just moving code around, in preparation for further changes to
the "windowing" API.
2014-10-10 11:36:12 -07:00