mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update WR (first phase of z-buffer optimizations / improvements).
This commit is contained in:
parent
183c4772e7
commit
3d9475457c
3 changed files with 32 additions and 16 deletions
30
Cargo.lock
generated
30
Cargo.lock
generated
|
@ -264,7 +264,7 @@ dependencies = [
|
|||
"canvas_traits 0.0.1",
|
||||
"cssparser 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -316,7 +316,7 @@ name = "cgl"
|
|||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gleam 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
|
@ -393,7 +393,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"euclid 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx_traits 0.0.1",
|
||||
"gleam 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"image 0.10.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -653,7 +653,7 @@ dependencies = [
|
|||
"devtools 0.0.1",
|
||||
"euclid 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx_traits 0.0.1",
|
||||
"gleam 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glutin_app 0.0.1",
|
||||
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libservo 0.0.1",
|
||||
|
@ -997,7 +997,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "gleam"
|
||||
version = "0.2.29"
|
||||
version = "0.2.30"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"gl_generator 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -1018,7 +1018,7 @@ dependencies = [
|
|||
"euclid 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gfx_traits 0.0.1",
|
||||
"gleam 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"msg 0.0.1",
|
||||
"net_traits 0.0.1",
|
||||
|
@ -1217,7 +1217,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
dependencies = [
|
||||
"cgl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-foundation 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"leaky-cow 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
@ -1477,7 +1477,7 @@ dependencies = [
|
|||
"euclid 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gaol 0.0.1 (git+https://github.com/servo/gaol)",
|
||||
"gfx 0.0.1",
|
||||
"gleam 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"layout 0.0.1",
|
||||
"layout_thread 0.0.1",
|
||||
|
@ -1869,7 +1869,7 @@ dependencies = [
|
|||
"euclid 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gl_generator 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -2550,7 +2550,7 @@ dependencies = [
|
|||
"cmake 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"expat-sys 2.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"glx 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"io-surface 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3181,7 +3181,7 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webrender"
|
||||
version = "0.11.0"
|
||||
source = "git+https://github.com/servo/webrender#845dcc9f0a2abdbe24754fb830897b0e3666e336"
|
||||
source = "git+https://github.com/servo/webrender#ee97fcaa4ee8eda89f7bd67b1a8920d3382af294"
|
||||
dependencies = [
|
||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"bincode 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3194,7 +3194,7 @@ dependencies = [
|
|||
"euclid 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"freetype 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3207,14 +3207,14 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "webrender_traits"
|
||||
version = "0.11.0"
|
||||
source = "git+https://github.com/servo/webrender#845dcc9f0a2abdbe24754fb830897b0e3666e336"
|
||||
source = "git+https://github.com/servo/webrender#ee97fcaa4ee8eda89f7bd67b1a8920d3382af294"
|
||||
dependencies = [
|
||||
"app_units 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"core-graphics 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"dwrote 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"euclid 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gleam 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ipc-channel 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"offscreen_gl_context 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -3404,7 +3404,7 @@ dependencies = [
|
|||
"checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685"
|
||||
"checksum gif 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "01c7c19a035de94bd7afbaa62c241aadfbdf1a70f560b348d2312eafa566ca16"
|
||||
"checksum gl_generator 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1d8edc81c5ae84605a62f5dac661a2313003b26d59839f81d47d46cf0f16a55"
|
||||
"checksum gleam 0.2.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b83402229bde9d923f0b92811be017f9df5946ee86f8647367b1e02bcf5c293"
|
||||
"checksum gleam 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)" = "6af023107aa969ccf8868a0304fead4b2f813c19aa9a6a243fddc041f3e51da5"
|
||||
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
|
||||
"checksum glx 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b280007fa9c7442cfd1e0b1addb8d1a59240267110e8705f8f7e2c7bfb7e2f72"
|
||||
"checksum harfbuzz-sys 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6b76113246f5c089dcf272cf89c3f61168a4d77b50ec5b2c1fab8c628c9ea762"
|
||||
|
|
|
@ -275,6 +275,7 @@ enum CompositeTarget {
|
|||
|
||||
struct RenderTargetInfo {
|
||||
framebuffer_ids: Vec<gl::GLuint>,
|
||||
renderbuffer_ids: Vec<gl::GLuint>,
|
||||
texture_ids: Vec<gl::GLuint>,
|
||||
}
|
||||
|
||||
|
@ -282,6 +283,7 @@ impl RenderTargetInfo {
|
|||
fn empty() -> RenderTargetInfo {
|
||||
RenderTargetInfo {
|
||||
framebuffer_ids: Vec::new(),
|
||||
renderbuffer_ids: Vec::new(),
|
||||
texture_ids: Vec::new(),
|
||||
}
|
||||
}
|
||||
|
@ -304,8 +306,21 @@ fn initialize_png(width: usize, height: usize) -> RenderTargetInfo {
|
|||
|
||||
gl::bind_texture(gl::TEXTURE_2D, 0);
|
||||
|
||||
let renderbuffer_ids = gl::gen_renderbuffers(1);
|
||||
let depth_rb = renderbuffer_ids[0];
|
||||
gl::bind_renderbuffer(gl::RENDERBUFFER, depth_rb);
|
||||
gl::renderbuffer_storage(gl::RENDERBUFFER,
|
||||
gl::DEPTH_COMPONENT24,
|
||||
width as gl::GLsizei,
|
||||
height as gl::GLsizei);
|
||||
gl::framebuffer_renderbuffer(gl::FRAMEBUFFER,
|
||||
gl::DEPTH_ATTACHMENT,
|
||||
gl::RENDERBUFFER,
|
||||
depth_rb);
|
||||
|
||||
RenderTargetInfo {
|
||||
framebuffer_ids: framebuffer_ids,
|
||||
renderbuffer_ids: renderbuffer_ids,
|
||||
texture_ids: texture_ids,
|
||||
}
|
||||
}
|
||||
|
@ -1534,6 +1549,7 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
gl::bind_framebuffer(gl::FRAMEBUFFER, 0);
|
||||
|
||||
gl::delete_buffers(&render_target_info.texture_ids);
|
||||
gl::delete_renderbuffers(&render_target_info.renderbuffer_ids);
|
||||
gl::delete_frame_buffers(&render_target_info.framebuffer_ids);
|
||||
|
||||
// flip image vertically (texture is upside down)
|
||||
|
|
|
@ -171,9 +171,9 @@ impl<Window> Browser<Window> where Window: WindowMethods + 'static {
|
|||
enable_scrollbars: opts.output_file.is_none(),
|
||||
renderer_kind: renderer_kind,
|
||||
enable_subpixel_aa: opts.enable_subpixel_text_antialiasing,
|
||||
clear_empty_tiles: true,
|
||||
clear_framebuffer: true,
|
||||
clear_color: webrender_traits::ColorF::new(1.0, 1.0, 1.0, 1.0),
|
||||
render_target_debug: false,
|
||||
})
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue