Bug 1624817 - Fix Tile invalidation during disabling WR native compositor r=gw
authorsotaro <sotaro.ikeda.g@gmail.com>
Thu, 02 Apr 2020 06:27:25 +0000
changeset 521760 95ddb3213aecaf87c0a4f2d3559bd17e0194148c
parent 521759 e377a27d74ae975075bd5207972e6f34423989cd
child 521761 f129d44e7878d7ccfd3a6876c5cf6a0dfd667d70
push id111840
push usersikeda.birchill@mozilla.com
push dateThu, 02 Apr 2020 07:18:29 +0000
treeherderautoland@95ddb3213aec [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgw
bugs1624817
milestone76.0a1
first release with
nightly linux32
95ddb3213aec / 76.0a1 / 20200402095145 / files
nightly linux64
95ddb3213aec / 76.0a1 / 20200402095145 / files
nightly mac
95ddb3213aec / 76.0a1 / 20200402095145 / files
nightly win32
95ddb3213aec / 76.0a1 / 20200402095145 / files
nightly win64
95ddb3213aec / 76.0a1 / 20200402095145 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1624817 - Fix Tile invalidation during disabling WR native compositor r=gw Differential Revision: https://phabricator.services.mozilla.com/D69168
gfx/wr/webrender/src/picture.rs
--- a/gfx/wr/webrender/src/picture.rs
+++ b/gfx/wr/webrender/src/picture.rs
@@ -2782,20 +2782,20 @@ impl TileCacheInstance {
 
         // If compositor mode is changed, need to drop all incompatible tiles.
         match frame_context.config.compositor_kind {
             CompositorKind::Draw { .. } => {
                 for tile in self.tiles.values_mut() {
                     if let Some(TileSurface::Texture { descriptor: SurfaceTextureDescriptor::Native { ref mut id, .. }, .. }) = tile.surface {
                         if let Some(id) = id.take() {
                             frame_state.resource_cache.destroy_compositor_tile(id);
-                            tile.surface = None;
-                            // Invalidate the entire tile to force a redraw.
-                            tile.invalidate(None, InvalidationReason::CompositorKindChanged);
                         }
+                        tile.surface = None;
+                        // Invalidate the entire tile to force a redraw.
+                        tile.invalidate(None, InvalidationReason::CompositorKindChanged);
                     }
                 }
 
                 if let Some(native_surface) = self.native_surface.take() {
                     frame_state.resource_cache.destroy_compositor_surface(native_surface.opaque);
                     frame_state.resource_cache.destroy_compositor_surface(native_surface.alpha);
                 }