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 535625 6343210ca9117911824175ac7dc3c873d804e290
parent 535624 52126fd9ffdf8322286962810e68257e28b1df93
child 535626 df0d6b993ad6feb4ebe87c69d630015466dbfeb5
push id37506
push userabutkovits@mozilla.com
push dateMon, 15 Jun 2020 09:26:24 +0000
treeherdermozilla-central@f05a0084c5f2 [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;
   }