mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #25853 - asajeffrey:surfmanup, r=jdm
Replace glutin by winit + surfman 0.2 <!-- Please describe your changes on the following line: --> This PR updates surfman to 0.2, and replaces glutin with winit+surfman. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes do not require tests because this should all be invisible <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
306e8ac5f9
94 changed files with 2265 additions and 1513 deletions
|
@ -1,5 +1,6 @@
|
|||
#include "pch.h"
|
||||
#include "Servo.h"
|
||||
#include <EGL/egl.h>
|
||||
|
||||
namespace winrt::servo {
|
||||
|
||||
|
@ -21,10 +22,6 @@ void on_url_changed(const char *url) {
|
|||
sServo->Delegate().OnServoURLChanged(char2hstring(url));
|
||||
}
|
||||
|
||||
void flush() { sServo->Delegate().Flush(); }
|
||||
|
||||
void make_current() { sServo->Delegate().MakeCurrent(); }
|
||||
|
||||
void wakeup() { sServo->Delegate().WakeUp(); }
|
||||
|
||||
bool on_allow_navigation(const char *url) {
|
||||
|
@ -128,7 +125,8 @@ const char *prompt_input(const char *message, const char *default,
|
|||
}
|
||||
|
||||
Servo::Servo(hstring url, hstring args, GLsizei width, GLsizei height,
|
||||
float dpi, ServoDelegate &aDelegate)
|
||||
EGLNativeWindowType eglNativeWindow, float dpi,
|
||||
ServoDelegate &aDelegate)
|
||||
: mWindowHeight(height), mWindowWidth(width), mDelegate(aDelegate) {
|
||||
SetEnvironmentVariableA("PreviewRuntimeEnabled", "1");
|
||||
|
||||
|
@ -140,6 +138,7 @@ Servo::Servo(hstring url, hstring args, GLsizei width, GLsizei height,
|
|||
o.height = mWindowHeight;
|
||||
o.density = dpi;
|
||||
o.enable_subpixel_text_antialiasing = false;
|
||||
o.native_widget = eglNativeWindow;
|
||||
|
||||
// Note about logs:
|
||||
// By default: all modules are enabled. Only warn level-logs are displayed.
|
||||
|
@ -179,8 +178,6 @@ Servo::Servo(hstring url, hstring args, GLsizei width, GLsizei height,
|
|||
#endif
|
||||
|
||||
capi::CHostCallbacks c;
|
||||
c.flush = &flush;
|
||||
c.make_current = &make_current;
|
||||
c.on_load_started = &on_load_started;
|
||||
c.on_load_ended = &on_load_ended;
|
||||
c.on_title_changed = &on_title_changed;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue