Fix winit_minimal.rs build (#35154)

Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
webbeef 2025-01-23 21:45:47 -08:00 committed by GitHub
parent a0eceee2ed
commit b95fa5ddd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,7 +18,7 @@ use servo_url::ServoUrl;
use surfman::{Connection, SurfaceType}; use surfman::{Connection, SurfaceType};
use tracing::warn; use tracing::warn;
use webrender_api::units::{DeviceIntPoint, DeviceIntRect, DevicePixel}; use webrender_api::units::{DeviceIntPoint, DeviceIntRect, DevicePixel};
use webrender_traits::RenderingContext; use webrender_traits::SurfmanRenderingContext;
use winit::application::ApplicationHandler; use winit::application::ApplicationHandler;
use winit::dpi::{PhysicalPosition, PhysicalSize}; use winit::dpi::{PhysicalPosition, PhysicalSize};
use winit::event::WindowEvent; use winit::event::WindowEvent;
@ -69,7 +69,7 @@ impl ApplicationHandler<WakerEvent> for App {
let adapter = connection let adapter = connection
.create_adapter() .create_adapter()
.expect("Failed to create adapter"); .expect("Failed to create adapter");
let rendering_context = RenderingContext::create(&connection, &adapter, None) let rendering_context = SurfmanRenderingContext::create(&connection, &adapter, None)
.expect("Failed to create rendering context"); .expect("Failed to create rendering context");
let native_widget = rendering_context let native_widget = rendering_context
.connection() .connection()
@ -93,7 +93,7 @@ impl ApplicationHandler<WakerEvent> for App {
let mut servo = Servo::new( let mut servo = Servo::new(
Default::default(), Default::default(),
Default::default(), Default::default(),
rendering_context, Rc::new(rendering_context),
Box::new(EmbedderDelegate { Box::new(EmbedderDelegate {
waker: waker.clone(), waker: waker.clone(),
}), }),