From bd16f1a33f329d155ae73f2c7c9addb6bb4027fa Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Wed, 24 Jan 2018 08:17:25 +1000 Subject: [PATCH] Update WR (new capture API, render target cache optimization) --- Cargo.lock | 30 +++++++++++++++--------------- components/canvas/webgl_thread.rs | 14 +++++++++----- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1598b0b3a7a..ebd5a97c22c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -281,7 +281,7 @@ dependencies = [ "cssparser 0.23.2 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", @@ -340,7 +340,7 @@ name = "cgl" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -439,7 +439,7 @@ version = "0.0.1" dependencies = [ "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", - "gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -761,7 +761,7 @@ dependencies = [ "compositing 0.0.1", "devtools 0.0.1", "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "glutin_app 0.0.1", "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "libservo 0.0.1", @@ -1074,7 +1074,7 @@ dependencies = [ [[package]] name = "gleam" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "gl_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1094,7 +1094,7 @@ dependencies = [ "compositing 0.0.1", "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "libservo 0.0.1", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", @@ -1294,7 +1294,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cgl 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.20 (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.33 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1550,7 +1550,7 @@ dependencies = [ "euclid 0.16.0 (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.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "layout_thread 0.0.1", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2005,7 +2005,7 @@ dependencies = [ "core-foundation 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "gl_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "libloading 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2416,7 +2416,7 @@ dependencies = [ "encoding_rs 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "half 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "html5ever 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2708,7 +2708,7 @@ dependencies = [ "cmake 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "expat-sys 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "glx 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "io-surface 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3359,7 +3359,7 @@ dependencies = [ [[package]] name = "webrender" version = "0.56.1" -source = "git+https://github.com/servo/webrender#e9269c7e06e20363be0b2a2a1be98d292ff7acca" +source = "git+https://github.com/servo/webrender#63e8bd1e65c67822510b9eef8479c20a7e0783cf" dependencies = [ "app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3372,7 +3372,7 @@ dependencies = [ "euclid 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "freetype 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", + "gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3387,7 +3387,7 @@ dependencies = [ [[package]] name = "webrender_api" version = "0.56.1" -source = "git+https://github.com/servo/webrender#e9269c7e06e20363be0b2a2a1be98d292ff7acca" +source = "git+https://github.com/servo/webrender#63e8bd1e65c67822510b9eef8479c20a7e0783cf" dependencies = [ "app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3649,7 +3649,7 @@ dependencies = [ "checksum getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9047cfbd08a437050b363d35ef160452c5fe8ea5187ae0a624708c91581d685" "checksum gif 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8a80d6fe9e52f637df9afd4779449a7be17c39cc9c35b01589bb833f956ba596" "checksum gl_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f5c19cde55637681450c92f7a05ea16c78e2b6d0587e601ec1ebdab6960854b" -"checksum gleam 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "4f756699879522bc654ecc44ad42ad14c59803c2dacfa5a67a7fc27257a8b4e9" +"checksum gleam 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)" = "959c818d9bbe9f7b7db55dce0bc44673c4da4f4ee122536c40550f984c3b8017" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" "checksum glx 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ac56da48dff37e91aa7bf6a47af1de951ef4666dd3dd85de1bd804334c5f933c" "checksum gvr-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92de62505f21ed0ce04f36cb0dca582a100fc4204d392e6b97bba2a15f9d24b3" diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index 730071421d9..4f2a45c20b6 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -502,7 +502,9 @@ impl WebGLThread webrender::ExternalImageHandler for WebGLExternal let (texture_id, size) = self.handler.lock(ctx_id); webrender::ExternalImage { - u0: 0.0, - u1: size.width as f32, - v1: 0.0, - v0: size.height as f32, + uv: webrender_api::TexelRect::new( + 0.0, + size.height as f32, + size.width as f32, + 0.0, + ), source: webrender::ExternalImageSource::NativeTexture(texture_id), }