mirror of
https://github.com/servo/servo.git
synced 2025-08-17 03:15:34 +01:00
libservo: Expose an OffscreenRenderingContext
and use it for servoshell (#35465)
Create a new `RenderingContext` which is used to render to a `SurfmanRenderingContext`-related offscreen buffer. This allows having a temporary place to render Servo and then blitting the results to a subsection of the parent `RenderingContext`. The goal with this change is to remove the details of how servoshell renders from the `Compositor` and prepare for the compositor-per-WebView world. Co-authred-by: Ngo Iok Ui (Wu Yu Wei) <yuweiwu@pm.me> Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
d466688526
commit
6dce329acc
15 changed files with 655 additions and 608 deletions
|
@ -11,6 +11,7 @@ use euclid::{Length, Scale};
|
|||
use servo::compositing::windowing::WindowMethods;
|
||||
use servo::servo_geometry::DeviceIndependentPixel;
|
||||
use servo::webrender_api::units::{DeviceIntPoint, DeviceIntSize, DevicePixel};
|
||||
use servo::webrender_traits::rendering_context::RenderingContext;
|
||||
use servo::{Cursor, WebView};
|
||||
|
||||
use super::app_state::RunningAppState;
|
||||
|
@ -46,4 +47,5 @@ pub trait WindowPortsMethods: WindowMethods {
|
|||
fn winit_window(&self) -> Option<&winit::window::Window>;
|
||||
fn toolbar_height(&self) -> Length<f32, DeviceIndependentPixel>;
|
||||
fn set_toolbar_height(&self, height: Length<f32, DeviceIndependentPixel>);
|
||||
fn rendering_context(&self) -> Rc<dyn RenderingContext>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue