aboutsummaryrefslogtreecommitdiffstats
path: root/components/compositing
Commit message (Collapse)AuthorAgeFilesLines
* constellation: clean up logging of pipelines and browsing contexts (#30657)Delan Azabani2023-11-141-1/+1
| | | | | | | * constellation: clean up logging of pipelines and browsing contexts * bring back sentence case; remove commented code * fix more typos and wordings
* Fix servoshell can't respond when there's no minibrowser (#30598)Ngo Iok Ui (Wu Yu Wei)2023-11-111-27/+8
| | | | | | | | | | | * Fix servoshell can't respond when there's no minibrowser * Remove external_field and update documentation * Update documentation * Fix crash when handling ReadyToPresent if it's headless mode * Fix some wpt tests got timedout
* Move `*_traits` and other shared types to `shared`Martin Robinson2023-11-031-8/+8
| | | | | | | | | | | | This is the start of the organization of types that are in their own crates in order to break dependency cycles between other crates. The idea here is that putting these packages into their own directory is the first step toward cleaning them up. They have grown organically and it is difficult to explain to new folks where to put new shared types. Many of these crates contain more than traits or don't contain traits at all. Notably, `script_traits` isn't touched because it is vendored from Gecko. Eventually this will move to `third_party`.
* Replace the time crate with std::time in components/compositing (#30613)Reid Swan2023-10-261-4/+15
| | | | | | | | | | | * Replace the time crate with std::time in components/compositing Signed-off-by: Reid Swan <reidswan@outlook.com> * Remove elapsed_since_epoch function --------- Signed-off-by: Reid Swan <reidswan@outlook.com>
* Rename messages forwarded from the constellation to the compositor (#30496)Martin Robinson2023-10-051-20/+41
| | | | | | The constellation forwards messages from other tasks to the compositor. Mainly, these are passed to WebRender. This change updates the names of these messages so it is clearer where they are coming from and where they are going.
* Only access hit test items for the current epoch in the compositor (#30491)Martin Robinson2023-10-041-1/+15
| | | | | | | | | | | | | | | When display lists update quickly, a hit test result might be returned for a previous display list / list of hit test items. When that happens, ignore the hit test result. This fixes a crash, but there might be situations where we can do something better, such as wait for display list processing to finish before performing the hit test. A future change might do this for events like mouse clicks and touch events that should never be thrown away. Ultimately, the best thing is likely moving hit testing back to layout or script so a valid hit test can always be performed against the current DOM. Fixes #29796.
* Add shell.background-color.rgba to prefs (#30488)Ngo Iok Ui (Wu Yu Wei)2023-10-042-2/+10
| | | | | | | * Add shell.transparent-background.enabled to prefs * Rename config to background_color * Rename to background-color and.rgba add PrefValue::Array variant
* Fix pinch zoom and enable it for TouchpadMagnify events (#30459)Martin Robinson2023-10-031-109/+141
| | | | | | | | | Pinch zoom was broken because pinch zoom events were triggered at -1, -1 in the compositor. This change: 1. Differentiates between magnify and scroll events in the compositor to remove the question of where to trigger them. 2. Converts winit TouchpadMagnify events into pinch zoom events so that this works properly on MacOS.
* Implement pinch zoom with a display list (#30446)Martin Robinson2023-10-021-15/+83
| | | | | In the most recent version of WebRender, the pinch zoom APIs have been removed. We can recreate this functionality by creating a root display list with a transform.
* Fix main frame scrolling in quirks mode after WebRender (#30375)Martin Robinson2023-09-181-1/+1
| | | | | | | Main frame scrolling after the WebRender upgrade was broken because the main frame no longer has content size content bounds and quirks mode leads to a body with zero height. Fixes #30368.
* servoshell: fix lockups while animating (#30322)Delan Azabani2023-09-121-0/+1
| | | | | | | | | | | * servoshell: fix lockups while animating * move comment to external_present declaration * disable needs_recomposite optimisation for now due to breakage * fix compile error that only happens on ci * fix more compile errors
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-114-22/+24
| | | | | * strict imports formatting * Reformat all imports
* Upgrade WebRender to e491e1ae637b2eed1e7195855d88357e5eb3ddf9 (#30323)Martin Robinson2023-09-102-52/+52
| | | | | | | | | | | | | | | | | | * Upgrade vendored version of WebRender * Patch WebRender: upgrade version of gleam * Restore hit testing implementation * Fix WebRender warnings * Adapt Servo to new WebRender * Update results * Add a workaround for #30313 This slightly expands text boundaries in order to take into account the fact that layout isn't measuring glyph boundaries.
* remove `extern crate` (#30311)Samson2023-09-083-4/+2
| | | | | | | | | | | * 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>
* [NFC] compositing: extract types into new compositing_traits crate (#30125)Delan Azabani2023-08-184-377/+60
| | | | | | | | | | | * [NFC] compositing: extract types into new compositing_traits crate * [NFC] compositing: move InitialCompositorState back to compositing * [NFC] compositing: rename Msg to CompositorMsg * [NFC] compositing: revert changes to Cargo.toml features section * [NFC] compositing: merge imports
* winit: initial minibrowser (#29976)Delan Azabani2023-08-152-6/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * winit: add minibrowser feature that depends on egui{,-winit} * winit: carve out some space at the top of headed windows * winit: minimal toolbar and egui/winit integration (but no painting) * winit: try to paint with egui_glow (doesn’t work yet) * winit: add comment about toolbar size * Add framebuffer object, set it as glow's target * compositing: clear only the viewport, not the whole framebuffer * plumb the actual size of the egui toolbar to webrender * fix formatting * winit: fix crash when fbo is zero * winit: don’t bother binding the framebuffer object * winit: remove unsafe and get toolbar_height * winit: location field should reflect the current top-level url * [NFC] winit: move Minibrowser out of App::run * winit: clean up toolbar height code * winit: make App own the Minibrowser if any * winit: make the go button work * winit:make the location field reflect the current top-level url * winit: allow enabling minibrowser from command line * winit: tell compositor to repaint WR and flush when we repaint * winit: fix bug where location field edits would get overridden * winit: borrow the minibrowser once in App::handle_events * winit: address todo about viewport origin coordinates * winit: fix some minor problems with comments and errors * winit: update location field once per HistoryChanged event * winit: rename Window::set_toolbar_size to set_toolbar_height * winit: take toolbar height into account in hit testing * winit: pass egui only relevant CursorMoved events * winit: scratch that, coalesce minibrowser updates instead * ensure both minibrowser and WR are repainted on every frame * compositing: only skip framebuffer clear in external present mode * winit: destroy egui glow Painter when shutting down * winit: clean up and fix license lint * fix duplicate versions lint by downgrading bytemuck_derive was egui_glow ^0.22.0 (0.22.0) → egui/bytemuck ^0.22.0 (0.22.0) → epaint/bytemuck ^0.22.0 (0.22.0) → bytemuck ^1.7.2 (1.13.1) → bytemuck_derive ^1.4 (1.4.1) → syn ^2.0.1 (2.0.28) now lock has bytemuck_derive 1.4.0 → syn ^1.0.99 (1.0.103) * fix duplicate versions lint by disabling egui-winit/links (we don’t need support for hyperlinks in our use of egui) * squelch duplicate versions lint by excluding clipboard-win * winit: fix compile warnings * winit: make gleam an optional dependency under /minibrowser * winit: remove cargo feature, since it’s not really optional * winit: extract Minibrowser and related code to separate module * winit: remove unnecessary trailing comma * winit: simplify the ServoUrl serialisation optimisation --------- Co-authored-by: atbrakhi <atbrakhi@igalia.com>
* Fix viewport origin of webrender frame (#30088)Ngo Iok Ui (Wu Yu Wei)2023-08-102-1/+8
| | | | | * Fix viewport origin of webrender frame * Update documentations
* [NFC] winit: document event handling and improve naming (#30016)Delan Azabani2023-07-241-32/+32
| | | | | | | | | | | | | | | * compositing: rename WindowEvent to EmbedderEvent * winit: rename winit_event_to_{servo → embedder}_event * winit: rename ServoEvent::Awakened to WakerEvent * winit: document App::handle_events and rename locals * servo: rename Servo.embedder_events to messages_for_embedder * winit: rustdoc link to EmbedderEvent * winit: use new name queue_embedder_events_for_winit_event
* Stop using webrender_api::get_scroll_node_state (#30000)Martin Robinson2023-07-171-27/+23
| | | | | | | | | This API has been removed in the latest version of WebRender and we can simply get this information from the compositor-side scroll tree. In addition, this change limits the amount of data sent to the pipeline that actually changed and gives the function in the compositor a better name. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Try to `use` WebRender types moreMartin Robinson2023-07-103-46/+37
| | | | | The newer versions of WebRender move types around between `webrender` and `webrender_api` and this will reduce the churn during the upgrade.
* Vendor the current version of WebRenderMartin Robinson2023-07-031-2/+2
| | | | | | | | This is a step toward upgrading WebRender, which will be upgraded and patched in the `third_party` directory. This change vendors the current private branch of WebRender that we use and adds a `patches` directory which tracks the changes on top of the upstream WebRender commit described by third_party/webrender/patches/head.
* It was removed from the spec and it's disabled everywhere.Emilio Cobos Álvarez2023-06-302-23/+0
| | | | This also removes the meta viewport support (which was implemented on top), but that also had a single test and is disabled everywhere, so I'm not too concerned, it can be implemented again if / when needed.
* Clean up and document the `send_display_list` interfaceMartin Robinson2023-05-241-18/+19
| | | | | | This moves more members to the CompositorDisplayListInfo struct, which now holds all miscellaneous, non-WebRender data when sending display lists. It also documents what each things sent with a display list does.
* Add a compositor-side scroll treeMartin Robinson2023-05-192-4/+86
| | | | | | This will allow the compositor to properly chain scrolling requests up when a node has reached the extent of the scroll area. This fixes scrolling on servo.org.
* Start the transition to workspace dependenciesMartin Robinson2023-05-171-10/+10
| | | | | | | This will ultimately make it simpler to update crate dependencies and reduce duplicate when specifying requirements. Generally, this change does not touch dependencies that are only used by a single crate. We could consider moving them to workspace dependencies in the future.
* Fix scrolling on root elementMartin Robinson2023-05-051-1/+5
| | | | | | | | | | | | | eca0acf4598c173c71765b961bd2079c0bb48cd2 uncovered a bug in the way that the scrolling area of `window` was calculated and broke scrolling on the root element. This change does two things in order to fix that: 1. Does a partial revert of eca0acf4598c173c71765b961bd2079c0bb48cd2 in order to get scrolling from script working again on the window object. 2. Has the compositor always generate a frame for scrolls starting from script and waits for them. This is speculative fix for flakiness in root scrolling tests on CI.
* Fix flakiness in hit testingMartin Robinson2023-04-261-0/+12
| | | | We need to make sure that hit testing from script reflects the latest display list we have sent from the compositor.
* Move hit testing information out of WebRenderMartin Robinson2023-03-151-66/+99
| | | | | | | | | Store hit testing information in a data structure that sits alongside the display list in the compositor. This will allow the compositor to store more information per-node. The data structure also takes care of de-duplicating information between successive display list entries. In the future, the data structure can be even more aggressive in producing smaller side hit testing lists, if necessary.
* Bump euclid to 0.22Martin Robinson2023-01-261-1/+1
| | | | | | | | | | | | | - Also updates raqote to latest with an upgrade of font-kit to 0.11 applied on as a patch - Update lyon_geom to the latest version Major change: - All matrices are now stored in row major order. This means that parameters to rotation functions no longer should be negated. - `post_...()` functions are now named `then()`. `pre_transform()` is removed, so `then()` is used and the order of operations changed.
* Update image/png.Josh Matthews2022-04-011-1/+1
|
* Update keyboard-types.Josh Matthews2022-04-011-1/+1
|
* Use IpcBytesReceiver to send Display list dataWu Yu Wei2022-03-101-18/+21
|
* Add SerializedImageData to use IpcBytesReceiverYu-Wei Wu2022-03-101-5/+18
|
* Create initial browser id for compositor on startup.Josh Matthews2021-10-182-22/+24
|
* Bump `time` to latest `v0.1.x` version.teymour-aldridge2021-06-251-1/+1
|
* Only request synchronous repaint when a resize will actually occur.Josh Matthews2021-03-051-2/+3
|
* Fix warnings introduced in newer Rust NightlySimon Sapin2021-02-252-7/+1
| | | | | | | | | | | | This does not (yet) upgrade ./rust-toolchain The warnings: * dead_code "field is never read" * redundant_semicolons "unnecessary trailing semicolon" * non_fmt_panic "panic message is not a string literal, this is no longer accepted in Rust 2021" * unstable_name_collisions "a method with this name may be added to the standard library in the future" * legacy_derive_helpers "derive helper attribute is used before it is introduced" https://github.com/rust-lang/rust/issues/79202
* Fix mouse button handlingYUAN LYU2020-12-061-1/+1
|
* Update webrender.Josh Matthews2020-08-101-1/+1
|
* Revert "Update webrender."Josh Matthews2020-08-041-1/+1
| | | | This reverts commit 2ca1b06e77f28cebeb886f50a6c21c438d4b2f46.
* Update webrender.Josh Matthews2020-07-311-1/+1
|
* Fix ordering of mousemove eventUtsav Oza2020-07-301-1/+1
|
* Make reload button clear the network cache.Josh Matthews2020-07-272-0/+6
|
* Auto merge of #27295 - asajeffrey:gstreamer-webxr, r=Manishearthbors-servo2020-07-171-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gstreamer plugin support for streaming from webxr <!-- Please describe your changes on the following line: --> Allows us to stream webxr video content. --- <!-- 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 do not require tests because we don't reftest the gstreamer plugin <!-- 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. -->
| * Gstreamer plugin support for streaming from webxrAlan Jeffrey2020-07-161-0/+3
| |
* | Unfocus input when virtual keyboard is dismissedPaul Rouget2020-07-132-0/+6
|/
* Update to 7/6 rustc.Josh Matthews2020-07-061-1/+0
|
* update keyboard-types cratePaul Rouget2020-06-291-1/+1
|
* Support for webxr layer managementAlan Jeffrey2020-06-281-9/+1
|
* Update webrender.Josh Matthews2020-06-112-2/+1
|