Bug 1654901 - Make WR primitives invisible when failing to prepare for rendering r=gw
authorDzmitry Malyshau <dmalyshau@mozilla.com>
Thu, 23 Jul 2020 23:29:54 +0000
changeset 541850 5e5b664a9b5ecba443472c38b1100bae3ab55c9e
parent 541849 ec25c0d069aed1f920a6f843830174a5d2b07676
child 541851 0148565169254928eebdc10cb9f87ebb79484924
push id37633
push userccoroiu@mozilla.com
push dateFri, 24 Jul 2020 09:32:06 +0000
treeherdermozilla-central@141543043270 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgw
bugs1654901
milestone80.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 1654901 - Make WR primitives invisible when failing to prepare for rendering r=gw the problem was that paths that determined visibility were not switching it off on the primitive instance. Now it's moved one level higher. Differential Revision: https://phabricator.services.mozilla.com/D84762
gfx/wr/webrender/src/prepare.rs
--- a/gfx/wr/webrender/src/prepare.rs
+++ b/gfx/wr/webrender/src/prepare.rs
@@ -105,16 +105,18 @@ pub fn prepare_primitives(
                 frame_state,
                 plane_split_anchor,
                 data_stores,
                 scratch,
                 tile_cache_log,
                 tile_caches,
             ) {
                 frame_state.profile_counters.visible_primitives.inc();
+            } else {
+                prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
             }
         }
     }
 }
 
 fn prepare_prim_for_render(
     store: &mut PrimitiveStore,
     prim_instance: &mut PrimitiveInstance,
@@ -158,18 +160,16 @@ fn prepare_prim_for_render(
                     tile_caches,
                 ) {
                     Some(info) => Some(info),
                     None => {
                         if prim_instance.is_chased() {
                             println!("\tculled for carrying an invisible composite filter");
                         }
 
-                        prim_instance.visibility_info = PrimitiveVisibilityIndex::INVALID;
-
                         return false;
                     }
                 }
             }
             PrimitiveInstanceKind::TextRun { .. } |
             PrimitiveInstanceKind::Rectangle { .. } |
             PrimitiveInstanceKind::LineDecoration { .. } |
             PrimitiveInstanceKind::NormalBorder { .. } |