From c0ff888dee5985be7b6d4fbb7f1ecdba7305456b Mon Sep 17 00:00:00 2001 From: Glenn Watson Date: Wed, 27 Jun 2018 09:07:32 +1000 Subject: [PATCH] Update WR, image (instance size optimizations). --- Cargo.lock | 70 ++++++++++++++------------ components/compositing/Cargo.toml | 2 +- components/compositing/compositor.rs | 2 +- components/net_traits/Cargo.toml | 2 +- components/script/Cargo.toml | 2 +- components/webdriver_server/Cargo.toml | 2 +- components/webdriver_server/lib.rs | 2 +- 7 files changed, 43 insertions(+), 39 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 91783d22f147..96a3a339bd9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [[package]] name = "adler32" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -426,7 +426,7 @@ dependencies = [ "euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "gfx_traits 0.0.1", "gleam 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -650,7 +650,7 @@ name = "deflate" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "adler32 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -827,14 +827,6 @@ dependencies = [ "libc 0.2.39 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "enum_primitive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "env_logger" version = "0.5.6" @@ -1037,7 +1029,7 @@ dependencies = [ [[package]] name = "gif" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "color_quant 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1234,17 +1226,18 @@ dependencies = [ [[package]] name = "image" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "byteorder 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "gif 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", + "gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "jpeg-decoder 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", + "lzw 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-derive 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", "num-rational 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "png 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "png 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "scoped_threadpool 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1260,10 +1253,10 @@ dependencies = [ [[package]] name = "inflate" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "adler32 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1904,7 +1897,7 @@ dependencies = [ "embedder_traits 0.0.1", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.10.0 (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.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1948,6 +1941,17 @@ name = "nom" version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "num-derive" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "num-traits 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "num-integer" version = "0.1.38" @@ -2190,12 +2194,12 @@ dependencies = [ [[package]] name = "png" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "deflate 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", - "inflate 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "inflate 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2484,7 +2488,7 @@ dependencies = [ "html5ever 0.22.3 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", "hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", "jstraceable_derive 0.0.1", @@ -3447,7 +3451,7 @@ dependencies = [ "cookie 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.10.13 (registry+https://github.com/rust-lang/crates.io-index)", - "image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", @@ -3465,7 +3469,7 @@ dependencies = [ [[package]] name = "webrender" version = "0.57.2" -source = "git+https://github.com/servo/webrender#db26bc0e86bd5585ee8b7426aef9f3443b005fdb" +source = "git+https://github.com/servo/webrender#46a967abf28b1b87b23901839ee6eee79ce9bd35" dependencies = [ "app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3481,7 +3485,7 @@ dependencies = [ "freetype 0.4.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.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)", + "image 0.19.0 (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.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3500,7 +3504,7 @@ dependencies = [ [[package]] name = "webrender_api" version = "0.57.2" -source = "git+https://github.com/servo/webrender#db26bc0e86bd5585ee8b7426aef9f3443b005fdb" +source = "git+https://github.com/servo/webrender#46a967abf28b1b87b23901839ee6eee79ce9bd35" dependencies = [ "app_units 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "bincode 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3708,7 +3712,7 @@ dependencies = [ ] [metadata] -"checksum adler32 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ff33fe13a08dbce05bcefa2c68eea4844941437e33d6f808240b54d7157b9cd" +"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" "checksum aho-corasick 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "500909c4f87a9e52355b26626d890833e9e1d53ac566db76c36faa984b889699" "checksum alloc-no-stdlib 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b21f6ad9c9957eb5d70c3dee16d31c092b3cab339628f821766b05e6833d72b8" "checksum android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" @@ -3780,7 +3784,6 @@ dependencies = [ "checksum energymon-builder 0.3.0 (git+https://github.com/energymon/energymon-sys.git)" = "" "checksum energymon-default-sys 0.3.0 (git+https://github.com/energymon/energymon-sys.git)" = "" "checksum energymon-sys 0.3.0 (git+https://github.com/energymon/energymon-sys.git)" = "" -"checksum enum_primitive 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be4551092f4d519593039259a9ed8daedf0da12e5109c5280338073eaeb81180" "checksum env_logger 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0561146661ae44c579e993456bc76d11ce1e0c7d745e57b2fa7146b6e49fa2ad" "checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" "checksum euclid 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c95fd0d455f114291a3109286bd387bd423770058474a2d3f38b712cd661df60" @@ -3798,7 +3801,7 @@ dependencies = [ "checksum gaol 0.0.1 (git+https://github.com/servo/gaol)" = "" "checksum gdi32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0912515a8ff24ba900422ecda800b52f4016a56251922d397c576bf92c690518" "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 gif 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff3414b424657317e708489d2857d9575f4403698428b040b609b9d1c1a84a2c" "checksum gl_generator 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a795170cbd85b5a7baa58d6d7525cae6a03e486859860c220f7ebbbdd379d0a" "checksum gleam 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "12b793fcf40a23dd372f184c228ab3eb96f88c50bb4fba8319c483aa025a4e45" "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" @@ -3818,9 +3821,9 @@ dependencies = [ "checksum hyper_serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0997ad463f64ce6ba02cf5af320622bb9782e4f8355b650a2cc7ccca69a7cc2e" "checksum ident_case 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3c9826188e666f2ed92071d2dadef6edc430b11b158b5b2b3f4babbcc891eaaa" "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" -"checksum image 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "545f000e8aa4e569e93f49c446987133452e0091c2494ac3efd3606aa3d309f2" +"checksum image 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ebdff791af04e30089bde8ad2a632b86af433b40c04db8d70ad4b21487db7a6a" "checksum immeta 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1aaaa557fbc7323c857871ce15f2b2c08d90548cba4aabda4251fac1b4778337" -"checksum inflate 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10ec05638adf7c5c788bc0cfa608cd479a13572beda20feb4898fe1d85d2c64b" +"checksum inflate 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4ec18d981200fd14e65ee8e35fb60ed1ce55227a02407303f3a72517c6146dcc" "checksum influent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a22b311b83431be3ab9af96ca9ea41554bb4a8551ea871ae44c3ce0c57e55f2c" "checksum io-surface 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6b506cf08070106ec8d802dd7c3b4290bf1f844e4cf6b0aaff68ede2a58b5922" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" @@ -3866,6 +3869,7 @@ dependencies = [ "checksum new_debug_unreachable 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0cdc457076c78ab54d5e0d6fa7c47981757f1e34dc39ff92787f217dede586c4" "checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2" "checksum nom 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b8c256fd9471521bcb84c3cdba98921497f1a331cbc15b8030fc63b82050ce" +"checksum num-derive 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d2c31b75c36a993d30c7a13d70513cb93f02acafdd5b7ba250f9b0e18615de7" "checksum num-integer 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac0ea58d64a89d9d6b7688031b3be9358d6c919badcf7fbb0527ccfd891ee45" "checksum num-iter 0.1.33 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d1891bd7b936f12349b7d1403761c8a0b85a18b148e9da4429d5d102c1a41e" "checksum num-rational 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "c2dc5ea04020a8f18318ae485c751f8cfa1c0e69dcf465c29ddaaa64a313cc44" @@ -3894,7 +3898,7 @@ dependencies = [ "checksum phf_shared 0.7.21 (registry+https://github.com/rust-lang/crates.io-index)" = "07e24b0ca9643bdecd0632f2b3da6b1b89bbb0030e0b992afc1113b23a7bc2f2" "checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" "checksum plane-split 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7079b8485b4f9d9560dee7a69ca8f6ca781f9f284ff9d2bf27255d440b03e4af" -"checksum png 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f0b0cabbbd20c2d7f06dbf015e06aad59b6ca3d9ed14848783e98af9aaf19925" +"checksum png 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f54b9600d584d3b8a739e1662a595fab051329eff43f20e7d8cc22872962145b" "checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" "checksum proc-macro2 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "77997c53ae6edd6d187fec07ec41b207063b5ee6f33680e9fa86d405cdd313d4" "checksum proc-macro2 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "effdb53b25cdad54f8f48843d67398f7ef2e14f12c1b4cb4effc549a6462a4d6" diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml index 7a3b2910487a..ea428a484833 100644 --- a/components/compositing/Cargo.toml +++ b/components/compositing/Cargo.toml @@ -18,7 +18,7 @@ embedder_traits = {path = "../embedder_traits"} euclid = "0.17" gfx_traits = {path = "../gfx_traits"} gleam = {version = "0.5", optional = true} -image = "0.18" +image = "0.19" ipc-channel = "0.10" libc = "0.2" log = "0.4" diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 0e17b41bafd6..df88f1697cd5 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -1268,7 +1268,7 @@ impl IOCompositor { Ok(mut file) => { let img = gl::draw_img(gl, rt_info, width, height); let dynamic_image = DynamicImage::ImageRgb8(img); - if let Err(e) = dynamic_image.save(&mut file, ImageFormat::PNG) { + if let Err(e) = dynamic_image.write_to(&mut file, ImageFormat::PNG) { error!("Failed to save {} ({}).", path, e); } }, diff --git a/components/net_traits/Cargo.toml b/components/net_traits/Cargo.toml index 0cd562ef12b5..c49e5857132e 100644 --- a/components/net_traits/Cargo.toml +++ b/components/net_traits/Cargo.toml @@ -16,7 +16,7 @@ cookie = "0.10" embedder_traits = { path = "../embedder_traits" } hyper = "0.10" hyper_serde = "0.8" -image = "0.18" +image = "0.19" ipc-channel = "0.10" lazy_static = "1" log = "0.4" diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index 40dc8d99be7d..ab9e25e7c886 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -51,7 +51,7 @@ half = "1.0" html5ever = "0.22" hyper = "0.10" hyper_serde = "0.8" -image = "0.18" +image = "0.19" ipc-channel = "0.10" itertools = "0.7.6" jstraceable_derive = {path = "../jstraceable_derive"} diff --git a/components/webdriver_server/Cargo.toml b/components/webdriver_server/Cargo.toml index 421d3defe57a..d21d1f6f0950 100644 --- a/components/webdriver_server/Cargo.toml +++ b/components/webdriver_server/Cargo.toml @@ -14,7 +14,7 @@ base64 = "0.6" cookie = "0.10" euclid = "0.17" hyper = "0.10" -image = "0.18" +image = "0.19" ipc-channel = "0.10" log = "0.4" msg = {path = "../msg"} diff --git a/components/webdriver_server/lib.rs b/components/webdriver_server/lib.rs index f660690a96c6..150a3001c715 100644 --- a/components/webdriver_server/lib.rs +++ b/components/webdriver_server/lib.rs @@ -836,7 +836,7 @@ impl Handler { let rgb = RgbImage::from_raw(img.width, img.height, img.bytes.to_vec()).unwrap(); let mut png_data = Vec::new(); - DynamicImage::ImageRgb8(rgb).save(&mut png_data, ImageFormat::PNG).unwrap(); + DynamicImage::ImageRgb8(rgb).write_to(&mut png_data, ImageFormat::PNG).unwrap(); let encoded = base64::encode(&png_data); Ok(WebDriverResponse::Generic(ValueResponse::new(encoded.to_json())))