aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* remove `extern crate` (#30311)Samson2023-09-081-12/+0
| | | | | | | | | | | * remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-59/+0
|
* Reorder gfx lib createskingdido9992018-09-081-4/+4
|
* Format the rest of gfx #21373kingdido9992018-09-081-13/+28
|
* Use the packed_simd crate instead of std::simdSimon Sapin2018-07-271-1/+2
| | | | | `std::simd` was removed in https://github.com/rust-lang/rust/pull/52535. https://crates.io/crates/packed_simd is in the rust-lang-nursery org.
* Upgrade to rustc 1.28.0-nightly (524ad9b9e 2018-05-29)Anthony Ramine2018-05-301-3/+1
| | | | Fixes https://github.com/servo/servo/issues/20844
* Use std::simd instead of the simd crateSimon Sapin2018-05-241-4/+1
|
* Auto merge of #20506 - jonleighton:font-fallback, r=emilio,mbrubeckbors-servo2018-05-191-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | Font fallback This implements more complete support for font fallback, see #17267. r? @glennw @mbrubeck <!-- 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/20506) <!-- Reviewable:end -->
| * Implement font fallbackJon Leighton2018-05-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this change, if none of the fonts specified in CSS contained a glyph for a codepoint, we tried only one fallback font. If that font didn't contain the glyph, we'd give up. With this change, we try multiple fonts in turn. The font names we try differ across each platform, and based on the codepoint we're trying to match. The current implementation is heavily inspired by the analogous code in Gecko, but I've used to ucd lib to make it more readable, whereas Gecko matches raw unicode ranges. This fixes some of the issues reported in #17267, although colour emoji support is not implemented. == Notes on changes to WPT metadata == === css/css-text/i18n/css3-text-line-break-opclns-* === A bunch of these have started failing on macos when they previously passed. These tests check that the browser automatically inserts line breaks near certain characters that are classified as "opening and closing punctuation". The idea is that if we have e.g. an opening parenthesis, it does not make sense for it to appear at the end of a line box; it should "stick" to the next character and go into the next line box. Before this change, a lot of these codepoints rendered as a missing glyph on Mac and Linux. In some cases, that meant that the test was passing. After this change, a bunch of these codepoints are now rendering glyphs on Mac (but not Linux). In some cases, the test should continue to pass where it previously did when rendering with the missing glyph. However, it seems this has also exposed a layout bug. The "ref" div in these tests contains a <br> element, and it seems that this, combined with these punctuation characters, makes the spacing between glyphs ever so slightly different to the "test" div. (Speculation: might be something to do with shaping?) Therefore I've had to mark a bunch of these tests failing on mac. === css/css-text/i18n/css3-text-line-break-baspglwj-* === Some of these previously passed on Mac due to a missing glyph. Now that we're rendering the correct glyph, they are failing. === css/css-text/word-break/word-break-normal-bo-000.html === The characters now render correctly on Mac, and the test is passing. But we do not find a suitable fallback font on Linux, so it is still failing on that platform. === css/css-text/word-break/word-break-break-all-007.html === This was previously passing on Mac, but only because missing character glyphs were rendered. Now that a fallback font is able to be found, it (correctly) fails. === mozilla/tests/css/font_fallback_* === These are new tests added in this commit. 01 and 02 are marked failing on Linux because the builders don't have the appropriate fonts installed (that will be a follow-up). Fix build errors from rebase FontTemplateDescriptor can no longer just derive(Hash). We need to implement it on each component part, because the components now generally wrap floats, which do not impl Hash because of NaN. However in this case we know that we won't have a NaN, so it is safe to manually impl Hash.
* | Revert "Upgrade to rustc 1.27.0-nightly (8a37c75a3 2018-05-02)"Josh Matthews2018-05-181-0/+3
|/ | | | This reverts commit 46ad8110172cfc9d8d420e8eb41863f3d394e24d.
* Upgrade to rustc 1.27.0-nightly (8a37c75a3 2018-05-02)Simon Sapin2018-05-041-3/+0
|
* Auto merge of #20420 - pyfisch:corner-clipping, r=emiliobors-servo2018-04-291-6/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move DL items from gfx to layout and implement corner clipping Implement corner clipping. Remove PixelFormat from WebrenderImageInfo. Use WebRender text shadow. Remove MallocSizeOf and Deserialize for DL items. Closes #19649, closes #19680, closes #19802 <!-- 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 - [x] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [x] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- 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/20420) <!-- Reviewable:end -->
| * Move DL items from gfx to layoutPyfisch2018-04-221-6/+0
| | | | | | | | | | | | | | | | | | Implement corner clipping. Remove PixelFormat from WebrenderImageInfo. Use WebRender text shadow. Remove MallocSizeOf and Deserialize for DL items. Closes #19649, #19680, #19802
* | Update WebrenderBastien Orivel2018-04-251-1/+1
|/ | | | Fixes #20609
* Use more WebRender types in gfxPyfisch2018-01-301-1/+0
| | | | | | | | Removes ImageBorder details from gfx. Use WebRender BorderRadius in BoxShadow. Stores cursors as integer. Use FilterOp, BorderWidths from WebRender. Store content_rect as LayoutRect.
* Stop relying on linking details of std’s default allocatorSimon Sapin2017-10-191-2/+2
| | | | | | | | | | | | 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.
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* Abuse Vec as an allocator in gfxSimon Sapin2017-10-131-1/+0
|
* Make usage of simd in gfx optionalSimon Sapin2017-10-131-1/+2
|
* Remove usage of unstable box syntax, except in the script crateSimon Sapin2017-10-121-1/+0
| | | | | … because there’s a lot of it, and script still uses any other unstable features anyway.
* Remove usage of unstable range_contains featureSimon Sapin2017-10-111-1/+0
|
* Stop using unstable 'unique' featureMatt Brubeck2017-09-201-1/+0
| | | | The `Unique` wrapper was only needed to provide the `Sync` trait.
* Replace all uses of the style::stylearc alias with servo_arc.Michael Partheil2017-07-191-0/+1
| | | | | | 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).
* Use heap API from std rather than the alloc crateSimon Sapin2017-07-131-4/+1
|
* Update to rustc 1.20.0-nightly (f85579d4a 2017-07-12)Anthony Ramine2017-07-131-4/+2
|
* Auto merge of #17694 - glennw:webrender-update, r=glennwbors-servo2017-07-121-1/+1
|\ | | | | | | | | | | | | | | 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 -->
| * Upgrade to the latest version of WebRenderMartin Robinson2017-07-131-1/+1
| |
* | Revert "Auto merge of #17633 - servo:rustup, r=nox"Emilio Cobos Álvarez2017-07-121-2/+4
|/ | | | | This reverts commit 327e72aa149cdad347196f37bdb64c3afc5ae5e0, reversing changes made to eec51cdd575cf985bc1ed926c6cb8868f1ba0e0e.
* Upgrade to rustc 1.20.0-nightly (696412de7 2017-07-06)Simon Sapin2017-07-071-4/+2
|
* Remove explicit dependencies on serde_deriveSimon Sapin2017-06-161-4/+1
|
* Ged rid of libfontconfig in Android. Query available fonts from Android ↵Imanol Fernandez2017-06-021-1/+3
| | | | system font configuration files.
* [gfx] [layout] [style] Upgrade unicode-bidi to 0.3Behnam Esfahbod2017-05-221-0/+1
|
* Kill the plugins crate and its clippy supportAnthony Ramine2017-02-211-3/+0
| | | | | | 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.
* Use 'alloc' gate only for platforms which use freetype in gfxTetsuharu OHZEKI2017-02-071-1/+4
|
* Silent Windows specific warningsUK9922017-02-061-1/+1
|
* Use SIMD in `gfx` when possibleMátyás Mustoha2017-02-041-2/+3
|
* Update rustc to 1.16.0-nightly (7821a9b99 2017-01-23).Ms2ger2017-01-241-4/+1
|
* Implement downloadable fonts on WindowsVladimir Vukicevic2017-01-181-0/+1
|
* Remove the rustc-serialize dependency from gfx.Ms2ger2017-01-101-1/+0
|
* Upgrade to rustc 1.16.0-nightly (6f1ae663e 2017-01-06)Simon Sapin2017-01-061-1/+0
|
* Removed util.Alan Jeffrey2016-12-141-1/+1
|
* Urlmageddon: Use refcounted urls more often.Emilio Cobos Álvarez2016-11-171-4/+2
|
* tidy and warning fixesVladimir Vukicevic2016-11-101-4/+1
|
* DirectWrite font backend for WindowsVladimir Vukicevic2016-11-101-4/+4
|
* Remove the direct azure dependencies from gfx, layout and layout_thread.Ms2ger2016-11-041-1/+0
| | | | | This does not cover transitive dependencies through canvas_traits, though that should not be too hard to solve either.
* Update to string-cache 0.3Simon Sapin2016-11-031-2/+1
|
* Remove #![feature(rustc_attrs)]Anthony Ramine2016-11-031-1/+0
|
* Remove #![feature(structural_match)]Anthony Ramine2016-11-031-1/+0
|
* Remove #![feature(custom_attribute)]Anthony Ramine2016-11-031-1/+0
|