Bug 1640901 - Update CompositorBridgeID when ImageHost is async in ImageLayerComposite::SetLayerManager() r=mattwoodrow
authorsotaro <sotaro.ikeda.g@gmail.com>
Sun, 14 Jun 2020 07:29:20 +0000
changeset 535642 6343210ca9117911824175ac7dc3c873d804e290
parent 535641 52126fd9ffdf8322286962810e68257e28b1df93
child 535643 df0d6b993ad6feb4ebe87c69d630015466dbfeb5
push id118987
push usersikeda.birchill@mozilla.com
push dateMon, 15 Jun 2020 00:35:26 +0000
treeherderautoland@6343210ca911 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1640901
milestone79.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 1640901 - Update CompositorBridgeID when ImageHost is async in ImageLayerComposite::SetLayerManager() r=mattwoodrow When Tab is moved to another window, all async ImageHosts need to update CompositorBridgeID. It is used for calling ScheduleComposition(). Differential Revision: https://phabricator.services.mozilla.com/D79068
gfx/layers/composite/ImageLayerComposite.cpp
--- a/gfx/layers/composite/ImageLayerComposite.cpp
+++ b/gfx/layers/composite/ImageLayerComposite.cpp
@@ -64,16 +64,19 @@ void ImageLayerComposite::Disconnect() {
 
 Layer* ImageLayerComposite::GetLayer() { return this; }
 
 void ImageLayerComposite::SetLayerManager(HostLayerManager* aManager) {
   LayerComposite::SetLayerManager(aManager);
   mManager = aManager;
   if (mImageHost) {
     mImageHost->SetTextureSourceProvider(mCompositor);
+    if (aManager && mImageHost->GetAsyncRef()) {
+      mImageHost->SetCompositorBridgeID(aManager->GetCompositorBridgeID());
+    }
   }
 }
 
 void ImageLayerComposite::RenderLayer(const IntRect& aClipRect,
                                       const Maybe<gfx::Polygon>& aGeometry) {
   if (!mImageHost || !mImageHost->IsAttached()) {
     return;
   }