Bug 1373381 - Update for NestingIndex change in WR cset 229cf3a. r?mrobinson draft
authorKartikaya Gupta <kgupta@mozilla.com>
Tue, 20 Jun 2017 09:38:51 -0400
changeset 597338 435d14af77f50ff8bde71753e3a5134e4c5921b5
parent 597337 49124ea0d79940964af08d1d0bbe09000be7b6f4
child 597339 dc9576bfb036cb2b557955c8f36a9e2cb94c74fa
push id64916
push userkgupta@mozilla.com
push dateTue, 20 Jun 2017 13:40:40 +0000
reviewersmrobinson
bugs1373381
milestone56.0a1
Bug 1373381 - Update for NestingIndex change in WR cset 229cf3a. r?mrobinson MozReview-Commit-ID: CK2andK4v6I
gfx/webrender_bindings/src/bindings.rs
--- a/gfx/webrender_bindings/src/bindings.rs
+++ b/gfx/webrender_bindings/src/bindings.rs
@@ -1378,18 +1378,19 @@ pub extern "C" fn wr_dp_push_clip(state:
         m.rect.origin = m.rect.origin - content_rect.origin.to_vector();
     }
 
     let clip_region = state.frame_builder.dl_builder.push_clip_region(&clip_rect, vec![], mask);
     let clip_id = state.frame_builder.dl_builder.define_clip(content_rect, clip_region, None);
     state.frame_builder.dl_builder.push_clip_id(clip_id);
     // return the u64 id value from inside the ClipId::Clip(..)
     match clip_id {
-        ClipId::Clip(id, pipeline_id) => {
+        ClipId::Clip(id, nesting_index, pipeline_id) => {
             assert!(pipeline_id == state.pipeline_id);
+            assert!(nesting_index == 0);
             id
         },
         _ => panic!("Got unexpected clip id type"),
     }
 }
 
 #[no_mangle]
 pub extern "C" fn wr_dp_pop_clip(state: &mut WrState) {
@@ -1442,17 +1443,17 @@ pub extern "C" fn wr_scroll_layer_with_i
 pub extern "C" fn wr_dp_push_clip_and_scroll_info(state: &mut WrState,
                                                   scroll_id: u64,
                                                   clip_id: *const u64) {
     assert!(unsafe { is_in_main_thread() });
     let scroll_id = ClipId::new(scroll_id, state.pipeline_id);
     let info = if let Some(&id) = unsafe { clip_id.as_ref() } {
         ClipAndScrollInfo::new(
             scroll_id,
-            ClipId::Clip(id, state.pipeline_id))
+            ClipId::Clip(id, 0, state.pipeline_id))
     } else {
         ClipAndScrollInfo::simple(scroll_id)
     };
     state.frame_builder.dl_builder.push_clip_and_scroll_info(info);
 }
 
 #[no_mangle]
 pub extern "C" fn wr_dp_pop_clip_and_scroll_info(state: &mut WrState) {