Commit graph

47 commits

Author SHA1 Message Date
Anthony Ramine
2c0acf6b9b Move PixelFormat to the pixels crate 2018-11-20 10:14:52 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Anthony Ramine
a5779ad372 Prefix some pixels functions with rgba8_ 2018-11-16 12:37:34 +01:00
Simon Sapin
9f977c5287 Remove useless use crate_name; imports.
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
Simon Sapin
76e59a46d3 Sort use statements 2018-11-06 15:26:02 +01:00
Simon Sapin
45f7199eee cargo fix --edition 2018-11-06 15:26:02 +01:00
Pyfisch
d41be1d56d Rustfmt net_traits crate 2018-11-03 16:18:44 +01:00
Anthony Ramine
784fbb2bc1 Merge some byte swap/premultiply functions in their own crate 2018-10-06 01:11:55 +02:00
Anthony Ramine
a2e3dd4e86 Rename byte_swap_and_premultiply to byte_swap_colors_inplace
The function did not actually premultiply.
2018-10-06 00:05:04 +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
cbcc7d0802 Remove usage of unstable feature iterator_step_by 2017-10-11 20:17:16 +02:00
Clément DAVID
c5fe235112 order derivable traits lists
Ignoring :
 - **generated**.rs
 - python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
Martin Robinson
e58e8ab42e Upgrade to the latest version of WebRender 2017-07-13 07:44:08 +10:00
Glenn Watson
e7b1e041c8 Update WR (CPU text optimizations, image format renames). 2017-06-16 15:27:22 +10:00
Alan Jeffrey
a47e94c8f6 Added Debug implementations. 2017-06-13 10:46:59 -05:00
Anthony Ramine
4c8a0f0626 Update Rust nightly to 1.19.0-nightly (2416e222e 2017-06-09) 2017-06-09 11:12:42 +02:00
Anthony Ramine
56c961af5a Revert "Update Rust nightly to 1.19.0-nightly (6165203c4 2017-06-03)"
This reverts commit f081380dc0.
2017-06-03 14:37:17 +02:00
Anthony Ramine
f081380dc0 Update Rust nightly to 1.19.0-nightly (6165203c4 2017-06-03) 2017-06-03 13:35:55 +02:00
Matt Brubeck
10478b4fa3 Stop using unstable slice_patterns feature 2017-05-01 14:19:00 -07:00
Ms2ger
b46846e2a0 Rustfmt net_traits. 2017-01-03 15:06:41 +01:00
Ms2ger
410e5c6d6f Use documentation comments for PixelFormat. 2017-01-03 15:06:34 +01:00
Ms2ger
dce2872f45 Move Image and PixelFormat to net_traits. 2016-10-21 16:12:39 +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
Travis Dean
6642358217 Add style check, test, and code fixes for an else brace check. 2016-07-04 18:38:13 -04:00
Ms2ger
0addbe36b0 Update to rustc 2016-06-14. 2016-06-15 00:27:36 +01:00
Per Lundberg
2f7ed1d73e Removed unused imports
This fixes #11185.
2016-05-15 22:24:26 +03:00
Kosov Eugene
d51c61481f move struct ImageMetadata to a better place 2016-05-09 00:44:49 +03:00
Ulf Nilsson
8c07a1a3af Use piston_image instead of stb_image for decoding JPEGs
Bump image to 0.7
2016-03-02 09:13:49 +01:00
Glenn Watson
c0531c312f Add WebRender integration to Servo.
WebRender is an experimental GPU accelerated rendering backend for Servo.

The WebRender backend can be specified by running Servo with the -w option (otherwise the default rendering backend will be used).

WebRender has many bugs, and missing features - but it is usable to browse most websites - please report any WebRender specific rendering bugs you encounter!
2016-02-18 10:35:29 +10:00
jmr0
167ffa7a95 adding image metadata notification capabilities to image cache 2016-01-29 20:54:49 -05:00
David Raifaizen
aa601be329 Adding method to detect if image formats should be supported by servo 2015-11-13 19:01:44 -05:00
Matt Brubeck
e2e142aae8 Replace libpng with image everywhere. 2015-10-10 07:43:11 -07:00
Matt Brubeck
b649246fe2 Replace stb_image with PistonDevelopers/image
Fixes #3368
2015-10-09 12:23:33 -07:00
Josh Matthews
8bb853f643 Fix existing syntactics nits. 2015-08-16 10:30:43 -04:00
João Oliveira
9c11781880 replace .len() == 0 with is_empty()
closes #7198
2015-08-14 04:00:33 +01:00
Bogdan Cuza
45145108da Measure heap memory usage for more types. Fixes #6951 2015-08-13 21:44:41 +03:00
Ms2ger
de39880fa6 Be less vocal about image parsing failures.
This should help fix some intermittent failures where this error message was
printed intertwined with the test results, causing wptrunner to not notice
the results.
2015-07-29 10:06:31 +02: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
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
Glenn Watson
83301ebb75 Add servo Image type. Remove rust-png dependency from script, gfx, layout. 2015-07-07 08:45:01 +10:00
Simon Sapin
ef8edd4e87 Upgrade to rustc 551a74dddd84cf01440ee84148ebd18bc68bd7c8. 2015-05-05 10:07:34 -04:00
Ms2ger
6a55ae06d7 Remove some as_slice calls. 2015-04-24 17:44:47 +02:00
Glenn Watson
d8aef7208e Refactored image cache task - details below.
* Simpler image cache API for clients to use.
 * Significantly fewer threads.
   * One thread for image cache task (multiplexes commands, decoder threads and async resource requests).
   * 4 threads for decoder worker tasks.
 * Removed ReflowEvent hacks in script and layout tasks.
   * Image elements pass a Trusted<T> to image cache, which is used to dirty nodes via script task. Previous use of Untrusted addresses was unsafe.
   * Image requests such as background-image on layout / paint threads trigger repaint only rather than full reflow.
 * Add reflow batching for when multiple images load quickly.
   * Reduces the number of paints loading wikipedia from ~95 to ~35.
 * Reasonably simple to add proper prefetch support in a follow up PR.
 * Async loaded images always construct Image fragments now, instead of generic.
   * Image fragments support the image not being present.
 * Simpler implementation of synchronous image loading for reftests.
 * Removed image holder.
 * image.onload support.
 * image NaturalWidth and NaturalHeight support.
 * Updated WPT expectations.
2015-04-23 09:40:24 +10:00
Aneesh Agrawal
5b593a3d32 Switch Arc<Box<Image>> to Arc<Image> for perf boost.
Image used to be a trait, but no longer is, so boxing it is no longer
necessary.
2015-04-10 18:59:02 -04:00
Ms2ger
b50b21d1da Stop using int/uint in net_traits. 2015-04-06 16:08:53 +02:00
Gilles Leblanc
ba36a108c1 Split out shared networking code into net_traits crate
Fixes #4476
2015-04-03 13:38:10 -04:00