Bug 1572197 - Fix world clip region for preserve-3d items with picture caching. r=emilio, a=RyanVM
authorGlenn Watson <github@intuitionlibrary.com>
Thu, 08 Aug 2019 04:49:09 +0000
changeset 545090 6d6c73623b32d35a52f4eaa9794355cb91dfc42d
parent 545089 f2b104ade7ce4feb6d4dea386f3e948733362b45
child 545091 596c8cf546960c06a1f34d4c087f78f999ef429b
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)
reviewersemilio, RyanVM
bugs1572197
milestone69.0
Bug 1572197 - Fix world clip region for preserve-3d items with picture caching. r=emilio, a=RyanVM When adding planes to the plane splitter, we supply a world clip rect to the polygon clipper. Generally this is used to help with float accuracy issues, but it also clips polygons to the visible region. The previous code supplied the visible world rect, but this is not always correct. When drawing picture cache tiles, we may be rendering to a tile that is partially off-screen. In this case we need to pass the combined world dirty rect, which is inflated to include the off-screen tile parts that are being drawn. This ensures that preserve-3d items are correctly clipped to the tile boundaries rather than the currently visible screen rect. Differential Revision: https://phabricator.services.mozilla.com/D41111
gfx/wr/webrender/src/prim_store/mod.rs
--- a/gfx/wr/webrender/src/prim_store/mod.rs
+++ b/gfx/wr/webrender/src/prim_store/mod.rs
@@ -3270,17 +3270,17 @@ impl PrimitiveStore {
                 ) {
                     if let Some(ref mut splitter) = pic_state.plane_splitter {
                         PicturePrimitive::add_split_plane(
                             splitter,
                             frame_context.clip_scroll_tree,
                             prim_instance.spatial_node_index,
                             pic.snapped_local_rect,
                             &prim_info.combined_local_clip_rect,
-                            frame_context.global_screen_world_rect,
+                            frame_state.current_dirty_region().combined,
                             plane_split_anchor,
                         );
                     }
 
                     // If this picture uses segments, ensure the GPU cache is
                     // up to date with segment local rects.
                     // TODO(gw): This entire match statement above can now be
                     //           refactored into prepare_interned_prim_for_render.