Ngo Iok Ui (Wu Yu Wei)
b5b69988cc
fix: bring back connection method to fix WebGL texture error ( #35358 )
...
* 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>
2025-02-07 10:36:37 +00:00
Ngo Iok Ui (Wu Yu Wei)
07aa4ce093
Simplify RenderingContext
trait methods ( #35251 )
...
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>
2025-02-05 12:02:11 +00:00
DK Liao
a0eceee2ed
feat: Turn RenderingContext
into a trait ( #35052 )
...
* 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>
2025-01-24 02:39:39 +00:00
Ngo Iok Ui (Wu Yu Wei)
47a243614f
feat: webxr
feature flag ( #34241 )
...
* 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>
2024-11-13 17:16:58 +00:00
Samson
fa9cb79fc8
remove sparkle from components/servo ( #33910 )
...
* 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>
2024-10-19 05:28:59 +00:00
Martin Robinson
0289377091
Move RenderingContext
to webrender_traits
( #32386 )
...
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.
2024-05-28 12:48:55 +00:00
eri
5c4f8cf0df
clippy: fix some warnings in components/canvas ( #31563 )
2024-03-08 07:24:01 +00:00
Martin Robinson
bc211f8ff3
gfx: Rename WebrenderSurfman
to RenderingContext
and move to gfx
( #31184 )
...
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`.
2024-01-27 17:58:34 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) ( #30325 )
...
* strict imports formatting
* Reformat all imports
2023-09-11 19:16:54 +00:00
Martin Robinson
a9d37cb85a
Upgrade WebRender to e491e1ae637b2eed1e7195855d88357e5eb3ddf9 ( #30323 )
...
* 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.
2023-09-10 12:38:56 +00:00
Samson
711dbbd4af
remove extern crate
( #30311 )
...
* 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>
2023-09-08 12:11:31 +00:00
Martin Robinson
c46631a1ce
Remove dependency on surfman-chains ( #30090 )
...
This functionality is now part of surfman itself.
2023-08-11 14:24:10 +00:00
Martin Robinson
3230162fd0
Try to use
WebRender types more
...
The newer versions of WebRender move types around between `webrender` and
`webrender_api` and this will reduce the churn during the upgrade.
2023-07-10 17:35:50 +02:00
Martin Robinson
ec3b2826ae
Remove the DOMToTexture feature
...
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
2023-06-27 11:39:52 +02:00
Alan Jeffrey
349619ed2d
Support for webxr layer management
2020-06-28 16:37:45 -05:00
Kunal Mohan
71401e0855
Implement GPUSwapChain and GPUCanvasContext and interface with Webrender
2020-06-13 17:46:12 +05:30
Josh Matthews
eb2f7f7f0a
Convert all uses of UpdateResources api to use webrender transactions.
2020-05-11 17:41:56 -04:00
Alan Jeffrey
8bb1732258
Update surfman to 0.2 and remove glutin
2020-04-17 23:44:53 -05:00
Alan Jeffrey
c611e46381
Remove WebVR
2020-04-08 20:23:41 -05:00
Josh Matthews
fbcf2bbc3e
Integrate swapchain surface provider changes into webgl and webxr implementations.
2020-03-09 17:50:54 -04:00
Josh Matthews
564c16d754
Use non-IPC webrender API over explicit IPC channels.
2019-11-27 20:47:53 -05:00
Alan Jeffrey
124de75089
Avoid recompiling script every time surfman changes
2019-11-18 09:40:58 -06:00
Manish Goregaokar
51bf8fcfe3
Remove patched webxr
2019-11-08 09:49:52 -08:00
Patrick Walton
a358bca766
Use surfman for managing GL surfaces
...
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>
2019-11-01 08:47:11 -05:00
Alan Jeffrey
c757a9c009
Get XR sessions to track the draw texture, so we render the XR framebuffer rather than the default canvas framebuffer
2019-07-28 10:24:38 -04:00
Alan Jeffrey
133a17e15c
Replace use of callbacks in webxr by channels
2019-07-26 23:36:13 -05:00
Alan Jeffrey
0178fcae4e
When using the WebGL external image API, use sync calls if we happen to be on the WebGL thread
2019-07-26 17:39:40 -05:00
Josh Matthews
39d13d1fc8
Support running WebGL in its own thread or on the main thread.
2019-07-25 23:05:03 -04:00
Emilio Cobos Álvarez
3d57c22e9c
Update euclid.
...
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.
2019-07-23 23:09:55 +02:00
Patrick Walton
2f9c9cefdb
WebRender units are no longer reexported.
2019-07-09 10:50:27 -04:00
Fernando Jiménez Moreno
0da87ad169
Introduce WebrenderExternalImageRegistry
2019-07-04 10:26:48 +02:00
Fernando Jiménez Moreno
ba9cf85fb3
Webrender external image handler demux
2019-07-04 10:26:47 +02:00
Paul Rouget
4dcee2f36c
WR update: new viewport semantic
2019-03-22 15:41:48 +08:00
Peter Hall
8bfd4dc1e2
#8539 Config preferences backend restructure
2019-03-20 15:01:26 +00:00
Peter Hall
1e9de470ea
Fixed inconsistency in import of gl::Gl
...
All other uses of `Gl` in this file use the qualified path `gl::Gl`.
2019-02-27 19:27:05 +00:00
Alan Jeffrey
8ddde7eacc
Pass the GL context to the VRDisplay when rendering
2019-02-27 08:57:02 -06:00
Simon Sapin
be69f9c3e6
Rustfmt has changed its default style :/
2018-12-28 13:17:47 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4)
2018-11-19 14:47:27 +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
Pyfisch
9e92eb205a
Reorder imports
2018-11-06 22:35:07 +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
Anthony Ramine
6e4bf750a4
Kill WebGLThreadObserver
2018-09-12 23:46:49 +02:00
kingdido999
f472d05003
Format components canvas and canvas_traits #21373
2018-08-30 11:24:39 +08:00
Imanol Fernandez
8ae0739bab
Implement DOM to texture
2017-10-16 20:56:53 +02:00
Imanol Fernandez
324e56b3d1
Improve Webrender<->WebGL synchronization
2017-09-20 11:48:11 +02:00
Anthony Ramine
676f2c8acf
Revert "Auto merge of #18114 - emilio:revert-webgl-refactor, r=nox"
...
This reverts commit 4d10d39e8f
, reversing
changes made to ee94e2b7c0
.
2017-08-16 23:23:18 +02:00
Emilio Cobos Álvarez
cfe22e3979
Revert "Auto merge of #17891 - MortimerGoro:webgl_move, r=glennw,emilio"
...
This reverts commit 90f55ea458
, reversing
changes made to 2e60b27a21
.
2017-08-16 16:42:13 +02:00
Imanol Fernandez
703962fe61
Improve WebGL architecture.
2017-08-15 22:14:32 +02:00