mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Fix winit_minimal.rs build (#35154)
Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
parent
a0eceee2ed
commit
b95fa5ddd6
1 changed files with 3 additions and 3 deletions
|
@ -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(),
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue