Commit graph

143 commits

Author SHA1 Message Date
Bastien Orivel
8bd2e91cdc Update Webrender
Fixes #20609
2018-04-25 10:25:21 +02:00
Pyfisch
8bb50ac0b9 Use more WebRender types in gfx
Removes ImageBorder details from gfx.
Use WebRender BorderRadius in BoxShadow.
Stores cursors as integer.
Use FilterOp, BorderWidths from WebRender.
Store content_rect as LayoutRect.
2018-01-30 11:37:20 +01:00
Simon Sapin
959ce482dd Stop relying on linking details of std’s default allocator
We’ve been bitten before by symbol names changing:
https://github.com/servo/heapsize/pull/46
and upstream is planning to stop using jemalloc by default:
https://github.com/rust-lang/rust/issues/33082#issuecomment-309781465

So use the (relatively) new `#[global_allocator]` attribute
to explicitly select the system allocator on Windows
and jemalloc (now in an external crate) on other platforms.
This choice matches current defaults.
2017-10-19 09:52:50 +02:00
Nicholas Nethercote
4506f0d30c Replace all uses of the heapsize crate with malloc_size_of.
Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`.
`malloc_size_of` is better -- it handles various cases that `heapsize` does not
-- so this patch changes Servo to use `malloc_size_of`.

This patch makes the following changes to the `malloc_size_of` crate.

- Adds `MallocSizeOf` trait implementations for numerous types, some built-in
  (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`).

- Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't
  support that operation.

- For `HashSet`/`HashMap`, falls back to a computed estimate when
  `enclosing_size_of_op` isn't available.

- Adds an extern "C" `malloc_size_of` function that does the actual heap
  measurement; this is based on the same functions from the `heapsize` crate.

This patch makes the following changes elsewhere.

- Converts all the uses of `heapsize` to instead use `malloc_size_of`.

- Disables the "heapsize"/"heap_size" feature for the external crates that
  provide it.

- Removes the `HeapSizeOf` implementation from `hashglobe`.

- Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of`
  doesn't derive those types, unlike `heapsize`.
2017-10-18 22:20:37 +11:00
Simon Sapin
ff23a8536e Abuse Vec as an allocator in gfx 2017-10-13 11:11:00 +02:00
Simon Sapin
d9a311963f Make usage of simd in gfx optional 2017-10-13 11:10:58 +02:00
Simon Sapin
aa5761a5fb Remove usage of unstable box syntax, except in the script crate
… because there’s a lot of it,
and script still uses any other unstable features anyway.
2017-10-12 12:10:56 +02:00
Simon Sapin
a38df68e8a Remove usage of unstable range_contains feature 2017-10-11 20:13:40 +02:00
Matt Brubeck
2795e5fa9c Stop using unstable 'unique' feature
The `Unique` wrapper was only needed to provide the `Sync` trait.
2017-09-20 13:26:40 -07:00
Michael Partheil
b07ebbae6b Replace all uses of the style::stylearc alias with servo_arc.
The alias is left there temporarilly and will be removed completely in a later commit where
also components/style/gecko/generated/structs_{debug|release}.rs are re-generated (they still
use the old alias).
2017-07-19 09:29:05 +02:00
Simon Sapin
db1a3e54b0 Use heap API from std rather than the alloc crate 2017-07-13 15:26:40 +02:00
Anthony Ramine
612dbb868d Update to rustc 1.20.0-nightly (f85579d4a 2017-07-12) 2017-07-13 15:20:51 +02:00
bors-servo
173181a491 Auto merge of #17694 - glennw:webrender-update, r=glennw
Upgrade to the latest version of WebRender

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17694)
<!-- Reviewable:end -->
2017-07-12 21:52:27 -07:00
Martin Robinson
e58e8ab42e Upgrade to the latest version of WebRender 2017-07-13 07:44:08 +10:00
Emilio Cobos Álvarez
dc28d6244c
Revert "Auto merge of #17633 - servo:rustup, r=nox"
This reverts commit 327e72aa14, reversing
changes made to eec51cdd57.
2017-07-12 23:00:07 +02:00
Simon Sapin
665e9203a1 Upgrade to rustc 1.20.0-nightly (696412de7 2017-07-06) 2017-07-07 15:28:22 +02:00
Simon Sapin
605ef8b7ec Remove explicit dependencies on serde_derive 2017-06-16 13:58:21 +02:00
Imanol Fernandez
19fbec9d54 Ged rid of libfontconfig in Android. Query available fonts from Android system font configuration files. 2017-06-02 18:40:08 +02:00
Behnam Esfahbod
14c524df4f [gfx] [layout] [style] Upgrade unicode-bidi to 0.3 2017-05-22 20:06:19 -05:00
Anthony Ramine
63c4490e73 Kill the plugins crate and its clippy support
Sometimes clippy gets outdated by months, and its current support setup
means that each Servo component need to opt into it by depending on
the plugins crate manually, and not all components do that.
2017-02-21 11:50:36 +01:00
Tetsuharu OHZEKI
550d726ad2 Use 'alloc' gate only for platforms which use freetype in gfx 2017-02-07 01:32:19 +09:00
UK992
e0a20b5568 Silent Windows specific warnings 2017-02-06 02:28:56 +01:00
Mátyás Mustoha
93f4ae9057 Use SIMD in gfx when possible 2017-02-04 12:46:22 +01:00
Ms2ger
14fe337866 Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23). 2017-01-24 11:02:51 +01:00
Vladimir Vukicevic
a9611c31a7 Implement downloadable fonts on Windows 2017-01-18 13:30:58 -05:00
Ms2ger
137b277f1e Remove the rustc-serialize dependency from gfx. 2017-01-10 09:58:53 +01:00
Simon Sapin
67aea3bba4 Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06) 2017-01-06 17:43:31 +01:00
Alan Jeffrey
9be4fd56ce Removed util. 2016-12-14 18:04:37 -06:00
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often. 2016-11-17 18:34:23 +01:00
Vladimir Vukicevic
473df194fc tidy and warning fixes 2016-11-10 16:07:40 -05:00
Vladimir Vukicevic
db357b0334 DirectWrite font backend for Windows 2016-11-10 14:58:51 -05:00
Ms2ger
81ee81cbb0 Remove the direct azure dependencies from gfx, layout and layout_thread.
This does not cover transitive dependencies through canvas_traits, though that
should not be too hard to solve either.
2016-11-04 12:14:42 +01:00
Simon Sapin
53b638c0e2 Update to string-cache 0.3 2016-11-03 16:23:05 +01:00
Anthony Ramine
046a97fa13 Remove #![feature(rustc_attrs)] 2016-11-03 11:24:19 +01:00
Anthony Ramine
3bc26d1819 Remove #![feature(structural_match)] 2016-11-03 11:24:18 +01:00
Anthony Ramine
a9767333eb Remove #![feature(custom_attribute)] 2016-11-03 11:24:13 +01:00
Anthony Ramine
c4f27e42b7 Remove #![feature(custom_derive)] 2016-11-03 10:14:21 +01:00
bors-servo
c6e15f8ef2 Auto merge of #14028 - servo:rustup, r=nox,SimonSapin
Update Rust to 1.14.0-nightly (7c69b0d5a 2016-11-01)

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14028)
<!-- Reviewable:end -->
2016-11-02 21:49:08 -05:00
Simon Sapin
5bb4c6c884 Use heapsize_derive instead of heapsize_plugin 2016-11-03 01:10:32 +01:00
Ms2ger
44c80d5b18 Ignore the Content-Type header completely for @font-face.
This matches the previous default (network.mime.sniff off) behaviour in all
but one case: we will now accept a font without a `Content-Type` header, which
would previously have been ignored.
2016-11-02 16:15:15 +01:00
Ms2ger
fdf9312f2b Remove some unused gfx code. 2016-10-28 14:31:33 +02:00
Glenn Watson
acfdfd2fa9 Remove old rendering backend.
This removes paint threads, rust-layers dependency, and changes
optional webrender types to be required.

The use_webrender option has been removed, however I've left
the "-w" command line option in place so that wpt
runner can continue to pass that. Once it's removed from there
we can also remove the -w option.

Once this stage is complete, it should be fine to change the
display list building code to generate webrender display
lists directly and avoid the conversion step.
2016-10-18 10:21:27 +10:00
Anthony Ramine
1854566683 Update to Rust 1.14.0-nightly (19ac57926 2016-10-08)
A cargo bump and a switch to serde_derive is needed to do this rustup.
2016-10-09 18:53:47 +02:00
Glenn Watson
0849607239 Minimal Win32 font platform implementation.
This uses a (very simple) Win32 API call to enumerate font
families available, and load them as byte buffers.

The font rasterization itself is done by freetype.

This gets Servo + WR + Windows working, but should be improved
by adding a proper implementation that matches fonts correctly
and also uses DirectWrite (or GDI) to handle font rasterization.
2016-10-05 07:46:02 +10:00
Keegan McAllister
6cbf9e75df Sanitise web fonts
Fixes #3030.
2016-08-22 16:10:31 +02:00
Vladimir Vukicevic
5bbec7469d Native MSVC windows build, convert to cmake 2016-08-17 09:50:51 -04:00
Ravi Shankar
a04028eede Prefer length and percentage for word spacing 2016-08-09 17:53:40 +05:30
Ms2ger
db5ddb561c Reduce the scope of the allowed unsafe code in gfx::text. 2016-06-05 12:31:55 +02:00
Ms2ger
50e1e8bf02 Make the gfx::platform module private. 2016-06-05 12:31:53 +02:00
Ms2ger
400e1b8428 Remove support for gpu painting.
Fixes #3614.
Fixes #4683.
Fixes #7366.
2016-06-03 14:58:49 +02:00