mirror of
https://github.com/servo/servo.git
synced 2025-08-15 02:15:33 +01:00
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>
This commit is contained in:
parent
73507f58e6
commit
f34f2d9d0a
18 changed files with 514 additions and 470 deletions
|
@ -21,8 +21,7 @@ use servo::base::id::WebViewId;
|
|||
use servo::servo_geometry::DeviceIndependentPixel;
|
||||
use servo::servo_url::ServoUrl;
|
||||
use servo::webrender_api::units::DevicePixel;
|
||||
use servo::webrender_traits::rendering_context::{OffscreenRenderingContext, RenderingContext};
|
||||
use servo::{LoadStatus, WebView};
|
||||
use servo::{LoadStatus, OffscreenRenderingContext, RenderingContext, WebView};
|
||||
use winit::event::{ElementState, MouseButton, WindowEvent};
|
||||
use winit::event_loop::ActiveEventLoop;
|
||||
use winit::window::Window;
|
||||
|
@ -429,7 +428,7 @@ impl Minibrowser {
|
|||
.parent_context()
|
||||
.prepare_for_rendering();
|
||||
self.context.paint(window);
|
||||
let _ = self.rendering_context.parent_context().present();
|
||||
self.rendering_context.parent_context().present();
|
||||
}
|
||||
|
||||
/// Updates the location field from the given [WebViewManager], unless the user has started
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue