aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/webgl_mode
Commit message (Collapse)AuthorAgeFilesLines
* `compositing`: Combine `webrender_traits` and `compositing_traits` (#36372)Martin Robinson2025-04-061-4/+4
| | | | | | | | | | | | | | | These two traits both exposed different parts of the compositing API, but now that the compositor doesn't depend directly on `script` any longer and the `script_traits` crate has been split into the `constellation_traits` crate, this can be finally be cleaned up without causing circular dependencies. In addition, some unit tests for the `IOPCompositor`'s scroll node tree are also moved into `compositing_traits` as well. Testing: This just combines two crates, so no new tests are necessary. Fixes: #35984. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Update rustfmt to the 2024 style edition (#35764)Simon Wülker2025-03-031-1/+1
| | | | | | | | | | | | | * Use 2024 style edition Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> * Reformat all code Signed-off-by: Simon Wülker <simon.wuelker@arcor.de> --------- Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
* fix: bring back connection method to fix WebGL texture error (#35358)Ngo Iok Ui (Wu Yu Wei)2025-02-071-1/+3
| | | | | | | | | | | | | * Bring back connection method to fix texture error Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Print GL info in log instead Signed-off-by: Wu Yuwei <yuweiwu@pm.me> --------- Signed-off-by: Wu Yuwei <yuweiwu@pm.me>
* Simplify `RenderingContext` trait methods (#35251)Ngo Iok Ui (Wu Yu Wei)2025-02-051-14/+25
| | | | | | | | | | | | | | | | | | There are a few methods are still difficult to implement without the help of surfman. To simplify the trait methods, all methods that return surfman types are removed. They are either handled by embedders themselves or abstract to simpler types that servo components need. The most noticeable changes are: - Methods related to native surface are moved to servo_glue. The embedder should decide when to remove/replace the surface and it's outside of servo's scope. - Methods required by servo media now return exact media types for it. The other major change is sevevral difficult trait methods that are reuiqred by WebGL and Servo media have default implementation. So they can be optional for users to implement. Signed-off-by: Wu Wayne <yuweiwu@pm.me>
* feat: Turn `RenderingContext` into a trait (#35052)DK Liao2025-01-241-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: turn RenderingContext into a trait Signed-off-by: DK Liao <dklassic@gmail.com> Add comment and handle drop error Signed-off-by: DK Liao <dklassic@gmail.com> Add doc comment Signed-off-by: DK Liao <dklassic@gmail.com> Allow make_current to propagate Error Signed-off-by: DK Liao <dklassic@gmail.com> Fix all make_current occurances Signed-off-by: DK Liao <dklassic@gmail.com> Move back to Rc<dyn RenderingContext> Signed-off-by: DK Liao <dklassic@gmail.com> fix android/ohos Signed-off-by: DK Liao <dklassic@gmail.com> Fix build Signed-off-by: DK Liao <dklassic@gmail.com> fix android/ohos again Signed-off-by: DK Liao <dklassic@gmail.com> * Fix macOS smoke test Signed-off-by: DK Liao <dklassic@gmail.com> * Add comment for create_texture and destroy_texture Signed-off-by: DK Liao <dklassic@gmail.com> * Improve comments written Signed-off-by: DK Liao <dklassic@gmail.com> --------- Signed-off-by: DK Liao <dklassic@gmail.com>
* feat: `webxr` feature flag (#34241)Ngo Iok Ui (Wu Yu Wei)2024-11-131-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add webxr feature flag Add webxr feature flag to embedder_traits Add webxr flag to constellation Add webxr flag to compositor Add webxr flag to canvas Turn registry into optional Add webxr flag to servo lib Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> Co-authored-by: august kline <me@augustkline.com> * Cargo fmt Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Add missing license Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Cargo clippy Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> --------- Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> Co-authored-by: august kline <me@augustkline.com>
* remove sparkle from components/servo (#33910)Samson2024-10-191-2/+1
| | | | | | | | | | | | | * replace sparkle's GlType with canvas_traits's GlType Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> * remove sparkle from components/servo Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --------- Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Move `RenderingContext` to `webrender_traits` (#32386)Martin Robinson2024-05-281-2/+2
| | | | | | The `gfx_traits` crate is gradually become just about text and fonts and this is one of the few things there that is standing in the way of this. Eventually `webrender_traits` will be the general cross-process compositor API, so this sort of makes sense as well.
* clippy: fix some warnings in components/canvas (#31563)eri2024-03-081-1/+1
|
* gfx: Rename `WebrenderSurfman` to `RenderingContext` and move to `gfx` (#31184)Martin Robinson2024-01-271-4/+4
| | | | | | | | | | | This is a small cleanup that moves and renames this class. The rename is simply because we are exposing a lot about the details of Servo's rendering in the API and it makes sense to start thinking about abstracting that away a bit. This also moves the struct to `gfx`, which does have an effect on Servo's dependency graph. This adds a new dependency on gfx to `compositing`, but `compositing` had a transitive dependency on gfx before through `canvas`.
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-5/+6
| | | | | * strict imports formatting * Reformat all imports
* Upgrade WebRender to e491e1ae637b2eed1e7195855d88357e5eb3ddf9 (#30323)Martin Robinson2023-09-101-1/+2
| | | | | | | | | | | | | | | | | | * 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-081-0/+1
| | | | | | | | | | | * 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>
* Remove dependency on surfman-chains (#30090)Martin Robinson2023-08-111-6/+2
| | | This functionality is now part of surfman itself.
* Try to `use` WebRender types moreMartin Robinson2023-07-101-2/+3
| | | | | The newer versions of WebRender move types around between `webrender` and `webrender_api` and this will reduce the churn during the upgrade.
* Remove the DOMToTexture featureMartin Robinson2023-06-271-53/+0
| | | | | | | | | | | This relies on WebRender's frame output API, `set_output_image_handler`, which has been removed from the latest upstream [1]. It's sad to remove this feature, which was probably a lot of work to implement, but it seems difficult to patch WebRender to restore this functionality. Fixes #29936. 1. https://hg.mozilla.org/mozilla-central/rev/361521e3c52324809553c555fb066d50f023d9bf
* Support for webxr layer managementAlan Jeffrey2020-06-281-15/+8
|
* Implement GPUSwapChain and GPUCanvasContext and interface with WebrenderKunal Mohan2020-06-131-3/+6
|
* Convert all uses of UpdateResources api to use webrender transactions.Josh Matthews2020-05-111-0/+2
|
* Update surfman to 0.2 and remove glutinAlan Jeffrey2020-04-171-29/+17
|
* Remove WebVRAlan Jeffrey2020-04-081-3/+1
|
* Integrate swapchain surface provider changes into webgl and webxr ↵Josh Matthews2020-03-091-1/+10
| | | | implementations.
* Use non-IPC webrender API over explicit IPC channels.Josh Matthews2019-11-271-2/+2
|
* Avoid recompiling script every time surfman changesAlan Jeffrey2019-11-181-0/+2
|
* Remove patched webxrManish Goregaokar2019-11-081-2/+7
|
* Use surfman for managing GL surfacesPatrick Walton2019-11-012-177/+94
| | | | | | Co-authored-by: Alan Jeffrey <ajeffrey@mozilla.com> Co-authored-by: Zakor Gyula <gyula.zakor@h-lab.eu> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* Get XR sessions to track the draw texture, so we render the XR framebuffer ↵Alan Jeffrey2019-07-281-3/+10
| | | | rather than the default canvas framebuffer
* Replace use of callbacks in webxr by channelsAlan Jeffrey2019-07-261-19/+53
|
* When using the WebGL external image API, use sync calls if we happen to be ↵Alan Jeffrey2019-07-261-140/+99
| | | | on the WebGL thread
* Support running WebGL in its own thread or on the main thread.Josh Matthews2019-07-252-85/+167
|
* Update euclid.Emilio Cobos Álvarez2019-07-231-1/+1
| | | | | | | | There are a few canvas2d-related dependencies that haven't updated, but they only use euclid internally so that's not blocking landing the rest of the changes. Given the size of this patch, I think it's useful to get this landed as-is.
* WebRender units are no longer reexported.Patrick Walton2019-07-091-2/+2
|
* Introduce WebrenderExternalImageRegistryFernando Jiménez Moreno2019-07-041-1/+4
|
* Webrender external image handler demuxFernando Jiménez Moreno2019-07-041-9/+14
|
* WR update: new viewport semanticPaul Rouget2019-03-221-2/+2
|
* #8539 Config preferences backend restructurePeter Hall2019-03-201-2/+2
|
* Fixed inconsistency in import of gl::GlPeter Hall2019-02-271-2/+6
| | | | All other uses of `Gl` in this file use the qualified path `gl::Gl`.
* Pass the GL context to the VRDisplay when renderingAlan Jeffrey2019-02-271-2/+3
|
* Rustfmt has changed its default style :/Simon Sapin2018-12-281-2/+2
|
* Update MPL license to https (part 4)Jan Andre Ikenmeyer2018-11-192-2/+2
|
* Remove useless `use crate_name;` imports.Simon Sapin2018-11-081-2/+0
| | | | A `crate_name::foo` path always works in 2018
* `cargo fix --edition-idioms`Simon Sapin2018-11-081-9/+9
|
* Reorder importsPyfisch2018-11-061-2/+2
|
* Sort `use` statementsSimon Sapin2018-11-061-2/+2
|
* `cargo fix --edition`Simon Sapin2018-11-061-2/+2
|
* Kill WebGLThreadObserverAnthony Ramine2018-09-121-24/+1
|
* Format components canvas and canvas_traits #21373kingdido9992018-08-301-24/+65
|
* Implement DOM to textureImanol Fernandez2017-10-161-2/+54
|
* Improve Webrender<->WebGL synchronizationImanol Fernandez2017-09-201-4/+16
|
* Revert "Auto merge of #18114 - emilio:revert-webgl-refactor, r=nox"Anthony Ramine2017-08-162-0/+101
| | | | | This reverts commit 4d10d39e8fe841c5fe2ac58da2daaa13c10c140e, reversing changes made to ee94e2b7c0bd327abe8f9545b2a1f792f67a2bdd.