Commit graph

800 commits

Author SHA1 Message Date
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
bors-servo
886c08c393 Auto merge of #6712 - Ms2ger:traversal, r=pcwalton
Cleanup ParallelPostorderFlowTraversal.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6712)
<!-- Reviewable:end -->
2015-07-24 20:50:55 -06:00
Patrick Walton
f10c076180 profile: Make the time and memory profilers run over IPC.
Uses the `Router` abstraction inside `ipc-channel` to avoid spawning new
threads.
2015-07-24 17:02:17 -07:00
Patrick Walton
626974994a canvas: Move to shared memory for images and canvas backing stores.
The idea here is to land this before making images and canvas IPC-safe,
because this will shake out bugs relating to the shared memory. There
are currently test timeouts that are preventing multiprocess images and
canvas from landing, and I believe those are due to the inefficiency of
sending large amounts of data in the unoptimized builds we test with. By
moving to shared memory, this should drastically reduce the number of
copies and `serde` serialization.

Under the hood, this uses Mach OOL messages on Mac and temporary
memory-mapped files on Linux.
2015-07-24 16:14:24 -07:00
Matt Brubeck
dfac8ce4a1 Basic support for bidirectional text 2015-07-23 20:05:55 -07:00
bors-servo
f44d75e5b2 Auto merge of #6715 - Ms2ger:layoutelement, r=jdm
Implement more methods on LayoutJS.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6715)
<!-- Reviewable:end -->
2015-07-23 12:40:52 -06:00
Ms2ger
487eef88e3 Move the state getters to LayoutElementHelpers. 2015-07-23 20:30:59 +02:00
Ms2ger
849eb7837a Move the flag getters to LayoutNodeHelpers. 2015-07-23 20:13:06 +02:00
Ms2ger
14fbfa6aea Remove unused implementation of ParallelPostorderFlowTraversal for BubbleISizes. 2015-07-23 19:30:43 +02:00
Ms2ger
a18dea6578 Pass the SharedLayoutContext to FlowTraversalFunctions directly. 2015-07-23 19:30:26 +02:00
Ms2ger
17a9f8507e Remove the unused proxy argument to ParallelPostorderFlowTraversal::run_parallel. 2015-07-23 19:29:58 +02:00
Simon Sapin
055a1c5cee Update rust-selectors
Update for https://github.com/servo/rust-selectors/pull/37
2015-07-23 18:53:57 +02:00
bors-servo
37a1e22515 Auto merge of #6698 - Ms2ger:layoutelement, r=jdm
Implement some methods on LayoutJS<Element>.

Part of my long-term plan to stop exposing `unsafe_get()` outside the script crate.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6698)
<!-- Reviewable:end -->
2015-07-22 21:10:04 -06:00
Ms2ger
751a367eb9 Don't call type_id_for_layout directly in LayoutElement::is_link. 2015-07-22 18:29:38 +02:00
Ms2ger
9cc1e017ee Move local_name and namespace to LayoutJS<Element>. 2015-07-22 18:28:17 +02:00
Ms2ger
23c679d55a Implement style_attribute() on LayoutJS<Element>. 2015-07-22 17:27:23 +02:00
Bogdan Cuza
681b11c08b Fix #6680 2015-07-22 16:45:43 +03:00
Corey Farwell
b1b03a32db Upgrade rust-selectors, pass ':empty' tests
https://github.com/servo/rust-selectors/pull/36
2015-07-22 18:27:33 +07:00
Ms2ger
94e1d4d34c Don't call mutate_layout_data in get_{before,after}_pseudo.
We don't mutate anything.
2015-07-21 22:58:16 +02:00
Ms2ger
093204a224 Replace get_{before,after}_display by get_{before,after}_pseudo. 2015-07-21 22:27:40 +02:00
Ms2ger
2e6a723970 Merge has_{before,after}_pseudo into get_{before,after}_display. 2015-07-21 22:27:38 +02:00
Ms2ger
cc356e58ae Remove unused ThreadSafeLayoutNode::get_normal_display. 2015-07-21 22:27:36 +02:00
Ms2ger
930e111713 Scope ThreadSafeLayoutNode::first_child to ThreadSafeLayoutNodeChildrenIterator::new.
It is only used there.
2015-07-21 19:53:34 +02:00
Ms2ger
b3892b74f7 Simplify ThreadSafeLayoutNodeChildrenIterator::next(). 2015-07-21 19:53:23 +02:00
Nicholas Nethercote
f6525b8009 Register/unregister memory reporters in a better place.
By doing this on either side of the call to the relevant tasks' start()
method, we don't need to store the mem::ProfilerChan or the reporter
name in the task itself.
2015-07-20 16:19:51 -07:00
bors-servo
5ac80bff8e Auto merge of #6666 - glennw:exit-flag, r=larsbergstrom
Restore exit after load command line flag.

Also updates glutin with a crash fix that was exposed by this patch.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6666)
<!-- Reviewable:end -->
2015-07-20 15:37:33 -06:00
Bogdan Cuza
0baa6b477c Replace astersisks with appropriate versions in deps 2015-07-20 20:08:08 +03:00
Glenn Watson
4f28c93f40 Restore exit after load command line flag.
Also updates glutin with a crash fix that was exposed by this patch.
2015-07-20 11:19:13 +10:00
Patrick Walton
b6485a9eaf compositing: Make the constellation messages serializable. 2015-07-18 12:43:08 -07:00
Ms2ger
5d36fbca29 Reduce the amount of code in the unsafe block in ParallelPostorderFlowTraversal::run_parallel. 2015-07-17 14:52:00 +02:00
Ms2ger
46b36242a3 Use Ref::map to make ThreadSafeLayoutNode::style safe. 2015-07-17 14:51:58 +02:00
Ms2ger
bb444df679 Remove unused ThreadSafeLayoutNode::traverse_postorder_mut. 2015-07-17 13:26:23 +02:00
Ms2ger
c018863201 Stop using Option in ThreadSafeLayoutNodeChildrenIterator::parent_node. 2015-07-17 11:41:57 +02:00
Ms2ger
4b08cea663 Scope the allowed unsafe code in traversal.rs. 2015-07-17 11:41:06 +02:00
Ms2ger
3e2c44114c Move the traversal traits into the traversal module. 2015-07-17 11:40:40 +02:00
Patrick Walton
6eacb0c995 gfx: Make display lists serializable using serde.
This commit introduces the `serde` dependency, which we will use to
serialize messages going between processes in multiprocess Servo.

This also adds a new debugging flag, `-Z print-display-list-json`,
allowing the output of display list serialization to be visualized.
This will be useful for our experiments with alternate rasterizers.
2015-07-15 19:04:17 -07:00
Patrick Walton
e5b1ec4078 script: Split Pipeline::create into chrome process and content
process parts.

This will make it easier to adapt to IPC.

The trickiest part here was to make script tasks spawn new layout tasks
directly instead of having the pipeline do it for them. The latter
approach will not work in multiprocess mode, because layout and script
must run in the same address space and the pipeline cannot inject tasks
into another process.
2015-07-14 15:09:16 -07:00
Patrick Walton
9ce65c08a5 layout: Make the LayoutControlChan use IPC. 2015-07-14 13:45:52 -07:00
Ms2ger
ce4d442941 Move away from the repeat().take().collect() pattern.
This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.
2015-07-14 16:19:30 +02:00
bors-servo
c70d53c9fe Auto merge of #6588 - Ms2ger:has_children, r=pcwalton
Remove unused has_children method.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6588)
<!-- Reviewable:end -->
2015-07-13 23:01:54 -06:00
Ms2ger
17888045bd Pass the WorkQueue to LayoutTask::solve_constraints_parallel.
This removes the possibility of a panic by checking a constraint at compile
time rather than at run time.
2015-07-12 14:14:15 +02:00
Ms2ger
928f843392 Remove unused has_children method. 2015-07-10 19:34:04 +02:00
bors-servo
805232a85e Auto merge of #6574 - Ms2ger:for_node, r=pcwalton
Remove ReplacedImageFragmentInfo::for_node and unsafe code it required.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6574)
<!-- Reviewable:end -->
2015-07-08 08:02:30 -06:00
bors-servo
ce81745a8e Auto merge of #6576 - Ms2ger:scope-unsafe-context, r=pcwalton
Reduce the scope of the allowed unsafe code in context.rs.

Since I made unsafe code opt-in in layout, the unsafe code in this module has
been reduced to a single unsafe impl, so there is no reason to allow it in
the entire module.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6576)
<!-- Reviewable:end -->
2015-07-08 05:59:00 -06:00
Ms2ger
270f0aafed Reduce the scope of the allowed unsafe code in context.rs.
Since I made unsafe code opt-in in layout, the unsafe code in this module has
been reduced to a single unsafe impl, so there is no reason to allow it in
the entire module.
2015-07-08 11:28:59 +02:00
Ms2ger
fd944f7765 Remove the manual Send/Sync implementations for Fragment.
It was Send already, and ReplacedImageFragmentInfo::for_node was the only
member that wasn't Sync.
2015-07-08 10:52:34 +02:00
Ms2ger
7ca3dfb43f Remove ReplacedImageFragmentInfo::for_node.
It became unused in d8aef7208e.
2015-07-08 10:50:24 +02:00
bors-servo
effe569e32 Auto merge of #6573 - Ms2ger:warnings, r=jdm
Don't lose a possible error in <SpecificFragmentInfo as fmt::Debug>::fmt.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6573)
<!-- Reviewable:end -->
2015-07-08 00:35:38 -06:00
Ms2ger
f71ca62522 Don't lose a possible error in <SpecificFragmentInfo as fmt::Debug>::fmt. 2015-07-08 10:23:55 +02:00
Ms2ger
0302244709 Remove the unused unrooted_must_root permission from layout. 2015-07-08 11:36:52 +02:00