Commit graph

383 commits

Author SHA1 Message Date
bors-servo
50a30121bf Auto merge of #7021 - glennw:fix-7018, r=pcwalton
Fix display list optimization on retina displays. Fixes #7018.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7021)
<!-- Reviewable:end -->
2015-08-06 23:26:24 -06:00
bors-servo
76b4bae6ee Auto merge of #7054 - Manishearth:rollup, r=Manishearth
Rollup of 3 pull requests

- Successful merges: #7028, #7034, #7039
- Failed merges:

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7054)
<!-- Reviewable:end -->
2015-08-06 17:43:09 -06:00
Matt Brubeck
b5f9c06776 Rollup merge of #7015 - mbrubeck:arc-box, r=Ms2ger
Replace Arc<Box<TextRun>> with Arc<TextRun>

Removes an extraneous level of indirection.

r? @pcwalton

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7015)
<!-- Reviewable:end -->
2015-08-06 14:07:32 -07:00
Ms2ger
bf3ecaa901 Create a run_with_memory_reporting method to reduce the boilerplate associated with registering memory reporters. 2015-08-06 15:24:27 +02:00
Glenn Watson
6333961844 Fix display list optimization on retina displays. Fixes #7018. 2015-08-06 14:11:27 +10:00
Jack Moffitt
f570da28c2 Merge pull request #6988 from glennw/no-arc
No need for paint layer in stacking context to be an arc.
2015-08-05 20:06:09 -06:00
Matt Brubeck
8a09f738d4 Replace Arc<Box<TextRun>> with Arc<TextRun> 2015-08-05 18:28:20 -07:00
bors-servo
315c4f5ed7 Auto merge of #6983 - glennw:tf2, r=pcwalton
Support transforms for display list optimization. Prevents clipping in #6643.



<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6983)
<!-- Reviewable:end -->
2015-08-05 12:50:36 -06:00
bors-servo
11acfbc29f Auto merge of #6981 - pcwalton:github-font-fallback, r=metajack
gfx: Fix Core Text font instantiation for Web fonts on Mac.

r? @metajack

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6981)
<!-- Reviewable:end -->
2015-08-05 06:11:36 -06:00
bors-servo
0d8825c25c Auto merge of #6959 - servo:warnings_, r=jdm
Fix warnings

Adds on top of #6949.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6959)
<!-- Reviewable:end -->
2015-08-05 03:44:22 -06:00
Glenn Watson
aca98b2901 No need for paint layer in stacking context to be an arc. 2015-08-05 14:35:49 +10:00
Glenn Watson
11b1c19b05 Support transforms for display list optimization. Prevents clipping in #6643. 2015-08-05 11:48:07 +10:00
Patrick Walton
d6b9e3bdfd gfx: Fix Core Text font instantiation for Web fonts on Mac.
Fixes GitHub Octicons. A reftest has been added for this.
2015-08-04 17:07:44 -07:00
David Zbarsky
9fbe33b6f2 Implement strokeRect with zero-width or zero-height rects 2015-08-04 17:44:18 -04:00
Josh Matthews
039929da5c Warning police.
Closes #6949.
2015-08-04 15:16:15 +02:00
bors-servo
d77f9415c5 Auto merge of #6937 - mbrubeck:hb_funcs, r=glennw
Store Harfbuzz callback functions in a static var

r? gw

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6937)
<!-- Reviewable:end -->
2015-08-03 22:40:35 -06:00
Matt Brubeck
47a0d494ec Make Harfbuzz font_funcs static 2015-08-03 15:30:46 -07:00
Matt Brubeck
f1e268b1e8 Sort gfx crates.io dependencies and move to top 2015-08-03 15:30:46 -07:00
Matt Brubeck
f8e92b2b01 Implement the unicode-bidi property 2015-08-03 14:12:33 -07:00
Patrick Walton
7349b6ac28 layout: Tie transitions to the DOM node and finish them instantly when
new styles are set.

Tying transitions to the DOM node avoids quadratic complexity when
updating them.

Finishing transitions instantly when styles are updated makes our
behavior more correct.
2015-08-01 23:01:43 -07:00
Patrick Walton
2aa5174246 script: Make the resource task communication use IPC channels. 2015-07-31 11:28:09 -07:00
Patrick Walton
e9ec9289d6 gfx: Instantiate the CTFont corresponding to a Mac font on demand.
This avoids panics in multiprocess mode.
2015-07-31 08:42:30 -07:00
Patrick Walton
3be5bbbaa3 gfx: Split the paint messages into layout and chrome messages, and make
the layout messages serializable.
2015-07-31 08:42:29 -07:00
Patrick Walton
f041e1aa60 util: Remove the old broken SerializableLinkedList code in favor of
serde's native implementation.
2015-07-31 08:42:29 -07:00
Huon Wilson
b42117fe0c Avoid undefined behaviour by allocating with align 1.
The allocation APIs require that the alignment is a power-of-two;
meaning 1 is the "I don't care" alignment, not 0.
2015-07-30 10:49:42 -07:00
Martin Robinson
813d435e6d Update to the latest skia
Now GLRasteizationContexts require having an active GLContext. This will
allow preserving GLContexts and possibly framebuffers between
rasterization sessions, improving GL Rasterization performance.

Linux Before:
+ Painting Per Tile    4.5559    4.3392  1.6920  18.5548 74
Painting             170.1554  151.8353  0.0008 350.1093 28

Linux After:
+ Painting Per Tile    3.8726    3.1299  1.5848  12.6732 62
Painting              13.5480   10.8947  0.0029  39.1198 23
2015-07-30 06:24:00 -07:00
Glenn Watson
ddef25030b Accumulate and invert stacking context transform for hit tests.
This makes hit tests work on stacking contexts with transforms.

Ref #6643.
2015-07-28 14:38:09 +10: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
bors-servo
f778e0eecf Auto merge of #6629 - pcwalton:profiler-ipc, r=jdm
profile: Make the time and memory profilers run over IPC.

Uses a couple of extra threads to work around the lack of cross-process
boxed trait objects.

r? @nnethercote

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6629)
<!-- Reviewable:end -->
2015-07-24 18:55:05 -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
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
Matt Brubeck
dfac8ce4a1 Basic support for bidirectional text 2015-07-23 20:05:55 -07:00
Akos Kiss
fa86ea4f6f Add aarch64-unknown-linux-gnu support
* Adding dependencies
* Replacing `i8` with `libc::c_char` to build properly on platforms
  where char is unsigned.
2015-07-23 22:52:17 +00:00
Bogdan Cuza
681b11c08b Fix #6680 2015-07-22 16:45:43 +03: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
Bogdan Cuza
0baa6b477c Replace astersisks with appropriate versions in deps 2015-07-20 20:08:08 +03:00
Patrick Walton
b6485a9eaf compositing: Make the constellation messages serializable. 2015-07-18 12:43:08 -07: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
Michael Tremel
ff915ae86e Remove unused mut. 2015-07-14 22:16:44 -07:00
bors-servo
9af229b830 Auto merge of #6591 - servo:rustup_2015-07-10, r=larsbergstrom
Upgrade to rustc 1.3.0-dev (fddfd089b 2015-07-10)

Depends on https://github.com/jgraham/webdriver-rust/pull/12.

Fixes #6020.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6591)
<!-- Reviewable:end -->
2015-07-14 13:40:22 -06:00
Martin Robinson
efdf2cd601 Update to latest rust-layers, azure, and skia
GLRasterizationContext is now responsible for doing GPU rasterization.
It can coexist with its target NativeSurface, so we don't have to
continually recreate NativeSurfaces when doing GPU rasterization.
2015-07-14 17:48:50 -07:00
Matt Brubeck
e0d98acabc Remove dead code from gfx/text 2015-07-14 14:32:45 -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
Glenn Watson
f8eeef0eb4 Use atoms for font template structures. 2015-07-13 08:23:02 +10:00
bors-servo
10b0d8c537 Auto merge of #6530 - mrobinson:move-cache, r=pcwalton
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.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6530)
<!-- Reviewable:end -->
2015-07-08 03:14:21 -06: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
Patrick Walton
352ad53775 gfx: Round out when snapping rects to the nearest pixel.
Fixes `insert-inline-in-blocks-n-inlines-end-001` in the WPT tests.
2015-07-07 15:01:17 -07:00
bors-servo
ae01e97efa Auto merge of #6487 - pcwalton:background-tiling, r=glennw
gfx: Use a pattern instead of tiling images manually.

r? @SimonSapin

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6487)
<!-- Reviewable:end -->
2015-07-07 05:42:07 -06:00
Patrick Walton
3500af37d0 gfx: Use a pattern instead of tiling images manually. 2015-07-07 10:41:47 -07:00
Glenn Watson
83301ebb75 Add servo Image type. Remove rust-png dependency from script, gfx, layout. 2015-07-07 08:45:01 +10:00