Bug 1562989 - Fix WR frameID checks to not trigger on replay r=gw
authorDzmitry Malyshau <dmalyshau@mozilla.com>
Wed, 03 Jul 2019 01:35:39 +0000
changeset 543999 16f07487dbb277313057c0abbdb04c7f6dd0cb91
parent 543998 96a0d9fa805ab8da848b9ed147442389d8b30c8a
child 544000 0bee4245b65a13592d6ec4976ad5562056dbd982
push id2131
push userffxbld-merge
push dateMon, 26 Aug 2019 18:30:20 +0000
treeherdermozilla-release@b19ffb3ca153 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgw
bugs1562989
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1562989 - Fix WR frameID checks to not trigger on replay r=gw Differential Revision: https://phabricator.services.mozilla.com/D36650
gfx/wr/webrender/src/render_task.rs
--- a/gfx/wr/webrender/src/render_task.rs
+++ b/gfx/wr/webrender/src/render_task.rs
@@ -383,17 +383,17 @@ impl RenderTaskGraph {
 
                 self.tasks[task_index].children[nth_child] = blit_id;
                 task_redirects[task_index] = Some(blit_id);
             }
         }
     }
 
     pub fn get_task_address(&self, id: RenderTaskId) -> RenderTaskAddress {
-        #[cfg(debug_assertions)]
+        #[cfg(all(debug_assertions, not(feature = "replay")))]
         debug_assert_eq!(self.frame_id, id.frame_id);
         RenderTaskAddress(id.index as u16)
     }
 
     pub fn write_task_data(&mut self) {
         for task in &self.tasks {
             self.task_data.push(task.write_task_data());
         }
@@ -409,25 +409,25 @@ impl RenderTaskGraph {
     pub fn frame_id(&self) -> FrameId {
         self.frame_id
     }
 }
 
 impl ops::Index<RenderTaskId> for RenderTaskGraph {
     type Output = RenderTask;
     fn index(&self, id: RenderTaskId) -> &RenderTask {
-        #[cfg(debug_assertions)]
+        #[cfg(all(debug_assertions, not(feature = "replay")))]
         debug_assert_eq!(self.frame_id, id.frame_id);
         &self.tasks[id.index as usize]
     }
 }
 
 impl ops::IndexMut<RenderTaskId> for RenderTaskGraph {
     fn index_mut(&mut self, id: RenderTaskId) -> &mut RenderTask {
-        #[cfg(debug_assertions)]
+        #[cfg(all(debug_assertions, not(feature = "replay")))]
         debug_assert_eq!(self.frame_id, id.frame_id);
         &mut self.tasks[id.index as usize]
     }
 }
 
 /// Identifies the output buffer location for a given `RenderTask`.
 #[derive(Clone, Debug)]
 #[cfg_attr(feature = "capture", derive(Serialize))]