Commit graph

409 commits

Author SHA1 Message Date
Clark Gaebel
14b1c320a6 make naming more consistent 2014-10-28 10:06:39 -07:00
Clark Gaebel
6df1cc8e4c Run all task spawning through util, to allow for easy hooking.
During debugging, I found it useful to hook all task creation in a
central location, and util::task was the perfect place for it.

r? @pcwalton (or maybe someone else, I'm kinda sending you a bunch of
reviews today because I don't know who better to give them to)
2014-10-28 09:53:45 -07:00
Keegan McAllister
6ec0939a22 Dynamically check DOMRefCell access from layout in debug builds 2014-10-24 16:27:37 -07:00
Glenn Watson
b1c226778f Cache last fontgroup. Style recalc on wikipedia/rust 66ms -> 41ms. 2014-10-24 08:25:10 +10:00
bors-servo
a6f0159cb8 auto merge of #3765 : pcwalton/servo/profiler-cleanups, r=cgaebel
The only real user-visible change this effects is to trim URLs to 30 characters so they don't make huge lines on the terminal.

r? @cgaebel
2014-10-22 14:45:35 -06:00
Patrick Walton
d2d012165f util: Make some minor formatting cleanups to profiling and gfx 2014-10-22 07:49:56 -07:00
Patrick Walton
55222336b5 gfx: Paint in parallel in CPU painting mode 2014-10-22 07:47:47 -07:00
bors-servo
4b508195ac auto merge of #3769 : glennw/servo/font-au, r=pcwalton 2014-10-22 03:30:36 -06:00
Glenn Watson
8331cfe089 Convert internal font code to store pt size as Au. 2014-10-22 13:49:41 +10:00
bors-servo
1fd7650de5 auto merge of #3752 : pcwalton/servo/default-cpu, r=larsbergstrom
We've discussed this some and I think there's consensus to do it as a
pragmatic decision for now. CPU painting is more stable, especially with
buggy drivers, and faster (because we aren't caching the necessary
OpenGL objects yet and possibly for other reasons), so it provides a
better "out of the box" experience for newcomers to Servo who don't know
to pass the `-c` option. This patch continues to reftest both Skia and
Skia-GL out of a desire to keep options open. Skia-GL remains a
first-class citizen.

r? @metajack
2014-10-21 21:18:33 -06:00
bors-servo
691e42f7ef auto merge of #3749 : pcwalton/servo/update-rust-azure, r=metajack
r? @metajack
2014-10-21 19:54:37 -06:00
Patrick Walton
32e34663cd gfx: Switch the default to CPU painting.
We've discussed this some and I think there's consensus to do it as a
pragmatic decision for now. CPU painting is more stable, especially with
buggy drivers, and faster (because we aren't caching the necessary
OpenGL objects yet and possibly for other reasons), so it provides a
better "out of the box" experience for newcomers to Servo who don't know
to pass the `-c` option. This patch continues to reftest both Skia and
Skia-GL out of a desire to keep options open. Skia-GL remains a
first-class citizen.
2014-10-21 11:13:21 -07:00
bors-servo
156ca98236 auto merge of #3722 : pcwalton/servo/flow-construction-overhaul, r=glennw
This is a grab bag of performance improvements that significantly improve style recalculation, layout, and painting on a few static pages.

Let me know if you'd like me to split this PR up.

r? @glennw
2014-10-21 10:06:37 -06:00
Patrick Walton
cd42c28f5b gfx: Don't needlessly push and pop clip rects all the time.
15% painting improvement on CNN.
2014-10-20 22:05:38 -07:00
Patrick Walton
79f84a62fe gfx: Make fonts that fail to match hit the cache too.
50%-100% layout perf improvement on CNN.
2014-10-20 22:05:38 -07:00
Patrick Walton
bb6f557276 layout: Rewrite text and inline fragment handling during flow
construction to avoid cloning and moving flows so much.

Besides amounting to a 5%-10% win on a page with a lot of text, this
simplifies and refactors the text layout code.
2014-10-20 22:05:38 -07:00
Glenn Watson
cf3d9dffd1 Update rust-core-text, handle empty font collections. Fixes #3703. 2014-10-21 14:54:37 +10:00
Patrick Walton
d08dfc0bcf gfx: Update rust-azure to pick up arcs, gradients, and subpixel text 2014-10-20 21:36:28 -07:00
Glenn Watson
076495db94 Use opts as a global, to avoid cloning and passing the struct all over the code. 2014-10-20 10:48:47 +10:00
Glenn Watson
b816550a17 Remove render backend option as it doesn't work and confuses people. 2014-10-20 07:39:36 +10:00
Patrick Walton
a6fcec468f layout: Remove FontStyle in favor of using the font style struct
directly, and optimize `get_layout_font_group()` to use a small vector.

Seems to be a 38% layout win on a site I tested with a lot of text.
2014-10-15 22:17:57 -07:00
bors-servo
48ce107d72 auto merge of #3675 : glennw/servo/local-fonts, r=pcwalton 2014-10-14 11:33:34 -06:00
Glenn Watson
1827852810 Add support for local font faces. Improves fonts on rust lang and guide. 2014-10-14 15:59:08 +10:00
Patrick Walton
bffaad118e layout: Rewrite clipping to be per-display-item instead of having
a separate `ClipDisplayItem`.

We push down clipping areas during absolute position calculation. This
makes display items into a flat list, improving cache locality. It
dramatically simplifies the code all around.

Because we need to push down clip rects even for absolutely-positioned
children of non-absolutely-positioned flows, this patch alters the
parallel traversal to compute absolute positions for
absolutely-positioned children at the same time it computes absolute
positions for other children. This doesn't seem to break anything either
in theory (since the overall order remains correct) or in practice. It
simplifies the parallel traversal code quite a bit.

See the relevant Gecko bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=615734
2014-10-13 21:40:36 -07:00
Glenn Watson
a70850c261 Fix selection of fallback fonts. Fixes monospace fonts in rust guide.
Previously, any font template that could not be found would return
an item from the last resort font family. Now, the last resort font
family is only searched if the entire list of supplied font families
is empty.
2014-10-13 15:39:53 +10:00
Clark Gaebel
d12c6e7383 Incremental Style Recalc
This patch puts in the initial framework for incremental reflow. Nodes' styles
are no longer recalculated unless the node has changed.

I've been hacking on the general problem of incremental reflow for the past
couple weeks, and I've yet to get a full implementation that actually passes all
the reftests + wikipedia + cnn. Therefore, I'm going to try to land the different
parts of it one by one.

This patch only does incremental style recalc, without incremental flow
construction, inline-size bubbling, reflow, or display lists. Those will be coming
in that order as I finish them.

At least with this strategy, I can land a working version of incremental reflow,
even if not yet complete.

r? @pcwalton
2014-10-09 12:55:21 -04:00
Tim Taubert
35f8270c64 Remove unnecessary deref()s (fixes #3586) 2014-10-09 15:01:54 +02:00
Patrick Walton
01c90d8d6a layout: Implement z-index. 2014-10-08 22:30:44 -07:00
bors-servo
a6cd13c890 auto merge of #3567 : mrobinson/servo/optimizer, r=zwarich
The page_rect passed to DisplayListOptimizer is relative to the
RenderLayer origin, but the display list components are relative to the
page origin. Before passing the page rect to the display list, we
translate it by the RenderLayer position.
2014-10-03 16:27:25 -06:00
Martin Robinson
ec29723f2b Account for RenderLayer position when optimizing display list
The page_rect passed to DisplayListOptimizer is relative to the
RenderLayer origin, but the display list components are relative to the
page origin. Before passing the page rect to the display list, we
translate it by the RenderLayer position.
2014-10-03 14:55:03 -07:00
Patrick Walton
dbdfce0695 gfx: Use subpixel positioning for glyphs.
Improves text rendering significantly.
2014-10-02 08:05:24 -07:00
Patrick Walton
cdc59fe68a gfx: Fix imprecision in float_to_fixed.
Improves text rendering a lot.
2014-10-01 22:07:50 -07:00
Josh Matthews
be41c203ac Fix linux build error. 2014-10-01 18:43:24 -04:00
Josh Matthews
8112859d55 Disallow toggling radio buttons. Use generated content for checkboxes and radio buttons. Switching to the glyph 0 for the average advance width. 2014-10-01 15:37:40 -04:00
Josh Matthews
9b20d6e7d2 Add average advance width to the font metrics structure, using the X glyph as a best guess. 2014-10-01 15:03:15 -04:00
Simon Sapin
b3245fa407 Upgrade to rustc d2b30f7d3 2014-09-23 2014-09-29 17:41:45 +01:00
Manish Goregaokar
3b842c4f06 Merge pull request #3466 from Ms2ger/into_string
Remove redundant into_string() calls.; r=jdm
2014-09-24 08:10:17 +05:30
glennw
98222cf24c Merge pull request #3459 from glennw/small-caps
Add support for small-caps font-variant.
2014-09-24 09:49:05 +10:00
Ms2ger
3a9e51ea17 Remove redundant into_string() calls. 2014-09-23 22:42:09 +02:00
Glenn Watson
f7b7a96961 Add fixme comment for future work, make scale factor a constant. 2014-09-24 06:00:46 +10:00
Manish Goregaokar
fcb25a35ec Rename macros crate to plugins 2014-09-23 17:37:27 +05:30
Glenn Watson
0dd1b85739 Add support for small-caps font-variant.
Ref: 2554.
2014-09-23 14:21:41 +10:00
Simon Sapin
c228b81ca8 Merge pull request #3437 from SimonSapin/https-deps
Use HTTPS for Cargo dependencies
2014-09-21 11:00:34 +01:00
Simon Sapin
afe28ae422 Use HTTPS for Cargo dependencies 2014-09-20 21:19:09 +01:00
Keegan McAllister
dc86e83654 Eliminate warnings 2014-09-20 13:00:55 -07:00
Keegan McAllister
a640a7c5c3 Upgrade to rustc 0.12.0-pre (4d2af3861 2014-09-17 15:51:11 +0000) 2014-09-20 13:00:06 -07:00
Clark Gaebel
1b251db732 Merge pull request #3379 from cgaebel/bucketed-timing
Added more complex profiling metadata.
2014-09-18 09:12:34 -07:00
Clark Gaebel
6bc63d47cd Added more complex profiling metadata. 2014-09-17 15:41:27 -07:00
Matt Brubeck
a939cc50bb Fix doctest errors in rustdoc comments
Mostly this disables doctest for comments that are not actually tests.
2014-09-17 14:46:37 -07:00
Glenn Watson
d9662fc571 Fix font flickering due to missed check in font cache. 2014-09-16 14:35:22 +10:00