servo: Merge #15826 - Update WR (overscroll support + fix viewport tests) (from glennw:update-wr-viewport); r=KiChjang
authorGlenn Watson <github@intuitionlibrary.com>
Sun, 05 Mar 2017 14:23:41 -0800
changeset 374991 197b5eb5e400671ef75994718d6bb77c0b7d874b
parent 374990 6a5f5358895267b7a8650bdb6287905c3e04c32d
child 374992 5368b2790c4292a3004bd2c9b44ecd3dd6187e0d
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersKiChjang
milestone54.0a1
servo: Merge #15826 - Update WR (overscroll support + fix viewport tests) (from glennw:update-wr-viewport); r=KiChjang Source-Repo: https://github.com/servo/servo Source-Revision: 6b28a18f45199cfd80a949178af810001fcb83e0
servo/Cargo.lock
servo/components/servo/lib.rs
--- a/servo/Cargo.lock
+++ b/servo/Cargo.lock
@@ -3171,17 +3171,17 @@ dependencies = [
  "url 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "uuid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "webdriver 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
 [[package]]
 name = "webrender"
 version = "0.22.1"
-source = "git+https://github.com/servo/webrender#68f5b72fb3f871f6930c772c7e2705412512dde2"
+source = "git+https://github.com/servo/webrender#f9860e08a22e9753974fbb7f34dbf675b2891b59"
 dependencies = [
  "app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bincode 1.0.0-alpha2 (registry+https://github.com/rust-lang/crates.io-index)",
  "bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-text 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -3199,17 +3199,17 @@ dependencies = [
  "threadpool 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)",
  "webrender_traits 0.23.1 (git+https://github.com/servo/webrender)",
 ]
 
 [[package]]
 name = "webrender_traits"
 version = "0.23.1"
-source = "git+https://github.com/servo/webrender#68f5b72fb3f871f6930c772c7e2705412512dde2"
+source = "git+https://github.com/servo/webrender#f9860e08a22e9753974fbb7f34dbf675b2891b59"
 dependencies = [
  "app_units 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "core-graphics 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "dwrote 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "euclid 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "gleam 0.2.32 (registry+https://github.com/rust-lang/crates.io-index)",
  "heapsize 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)",
--- a/servo/components/servo/lib.rs
+++ b/servo/components/servo/lib.rs
@@ -167,29 +167,33 @@ impl<Window> Browser<Window> where Windo
             let recorder = if opts.webrender_record {
                 let record_path = PathBuf::from("wr-record.bin");
                 let recorder = Box::new(webrender::BinaryRecorder::new(&record_path));
                 Some(recorder as Box<webrender::ApiRecordingReceiver>)
             } else {
                 None
             };
 
+            let framebuffer_size = window.framebuffer_size();
+            let framebuffer_size = webrender_traits::DeviceUintSize::new(framebuffer_size.width,
+                                                                         framebuffer_size.height);
+
             webrender::Renderer::new(webrender::RendererOptions {
                 device_pixel_ratio: device_pixel_ratio,
                 resource_override_path: Some(resource_path),
                 enable_aa: opts.enable_text_antialiasing,
                 enable_profiler: opts.webrender_stats,
                 debug: opts.webrender_debug,
                 recorder: recorder,
                 precache_shaders: opts.precache_shaders,
                 enable_scrollbars: opts.output_file.is_none(),
                 renderer_kind: renderer_kind,
                 enable_subpixel_aa: opts.enable_subpixel_text_antialiasing,
                 ..Default::default()
-            }).expect("Unable to initialize webrender!")
+            }, framebuffer_size).expect("Unable to initialize webrender!")
         };
 
         // Important that this call is done in a single-threaded fashion, we
         // can't defer it after `create_constellation` has started.
         script::init();
 
         // Create the constellation, which maintains the engine
         // pipelines, including the script and layout threads, as well