diff options
author | Martin Robinson <mrobinson@igalia.com> | 2025-02-18 15:50:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-18 14:50:41 +0000 |
commit | f34f2d9d0ab59dd4baa6a3a25849ece95861c461 (patch) | |
tree | e798148f24dc4b10bd4c3f90f0c82ddcddf3571f /components/servo/lib.rs | |
parent | 73507f58e63b130d91fcf6f1da13e643b9c469d3 (diff) | |
download | servo-f34f2d9d0ab59dd4baa6a3a25849ece95861c461.tar.gz servo-f34f2d9d0ab59dd4baa6a3a25849ece95861c461.zip |
libservo: Expose `SoftwareRenderingContext` and `WindowRenderingContext` (#35501)
Expose two easy-to-use wrappers around `SurfmanRenderingContext` that
make the API simpler to use:
- `WindowRenderingContext`: This `RenderingContext` is a newtype around
`SurfmanRenderingContext` takes a `raw-window-handle` display and window
and creates a full window rendering context.
- `SoftwareRenderingContext`: is wraps `SurfmanRenderingContext` and
adds a swap chain in order to expose a software GL rendering context.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Diffstat (limited to 'components/servo/lib.rs')
-rw-r--r-- | components/servo/lib.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/components/servo/lib.rs b/components/servo/lib.rs index b2e5028c52e..30164692c9d 100644 --- a/components/servo/lib.rs +++ b/components/servo/lib.rs @@ -101,7 +101,11 @@ pub use webgpu; use webgpu::swapchain::WGPUImageMap; use webrender::{RenderApiSender, ShaderPrecacheFlags, UploadMethod, ONE_TIME_USAGE_HINT}; use webrender_api::{ColorF, DocumentId, FramePublishId}; -use webrender_traits::rendering_context::{GLVersion, RenderingContext}; +use webrender_traits::rendering_context::GLVersion; +pub use webrender_traits::rendering_context::{ + OffscreenRenderingContext, RenderingContext, SoftwareRenderingContext, SurfmanRenderingContext, + WindowRenderingContext, +}; use webrender_traits::{ CrossProcessCompositorApi, WebrenderExternalImageHandlers, WebrenderExternalImageRegistry, WebrenderImageHandlerType, @@ -113,7 +117,7 @@ pub use { background_hang_monitor, base, canvas, canvas_traits, compositing, devtools, devtools_traits, euclid, fonts, ipc_channel, layout_thread_2020, media, net, net_traits, profile, profile_traits, script, script_layout_interface, script_traits, servo_config as config, - servo_config, servo_geometry, servo_url, style, style_traits, webrender_api, webrender_traits, + servo_config, servo_geometry, servo_url, style, style_traits, webrender_api, }; #[cfg(feature = "bluetooth")] pub use {bluetooth, bluetooth_traits}; |