mirror of
https://github.com/servo/servo.git
synced 2025-06-20 23:28:59 +01:00
Replace glut with glfw.
Also fixes initial window size to get based on the windowing code instead of being hardcoded everywhere. This code works on HiDPI displays, but does not appropriately scale the output up yet.
This commit is contained in:
parent
39e759fb20
commit
e0e5e1a2a7
11 changed files with 116 additions and 109 deletions
|
@ -183,7 +183,8 @@ impl ScriptTask {
|
|||
script_chan: ScriptChan,
|
||||
constellation_chan: ConstellationChan,
|
||||
resource_task: ResourceTask,
|
||||
img_cache_task: ImageCacheTask)
|
||||
img_cache_task: ImageCacheTask,
|
||||
initial_size: Size2D<int>)
|
||||
-> @mut ScriptTask {
|
||||
let js_runtime = js::rust::rt();
|
||||
let js_context = js_runtime.cx();
|
||||
|
@ -219,7 +220,7 @@ impl ScriptTask {
|
|||
|
||||
root_frame: None,
|
||||
|
||||
window_size: Size2D(800u, 600),
|
||||
window_size: Size2D(initial_size.width as uint, initial_size.height as uint),
|
||||
damage: None,
|
||||
|
||||
last_loaded_url: None,
|
||||
|
@ -253,7 +254,8 @@ impl ScriptTask {
|
|||
script_chan: ScriptChan,
|
||||
constellation_chan: ConstellationChan,
|
||||
resource_task: ResourceTask,
|
||||
image_cache_task: ImageCacheTask) {
|
||||
image_cache_task: ImageCacheTask,
|
||||
initial_size: Size2D<int>) {
|
||||
let compositor = Cell::new(compositor);
|
||||
let script_port = Cell::new(script_port);
|
||||
// FIXME: rust#6399
|
||||
|
@ -267,7 +269,8 @@ impl ScriptTask {
|
|||
script_chan.clone(),
|
||||
constellation_chan.clone(),
|
||||
resource_task.clone(),
|
||||
image_cache_task.clone());
|
||||
image_cache_task.clone(),
|
||||
initial_size);
|
||||
script_task.start();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue