Don't require a Compositor for setting DiagnosticTypes. (bug 1365879 part 14, r=mattwoodrow)
authorDavid Anderson <danderson@mozilla.com>
Tue, 20 Jun 2017 01:17:20 -0700
changeset 364896 f1ed5e2926515ffd4f0936dcb2002b0cb5372e94
parent 364895 a4f2141f8cad488f7b2ead38e4717e61af154532
child 364897 e41967e4099dd316c5f9aa3adc3de5dc53835234
push id32057
push userkwierso@gmail.com
push dateWed, 21 Jun 2017 00:59:08 +0000
treeherdermozilla-central@f31652d75fb5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1365879
milestone56.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
Don't require a Compositor for setting DiagnosticTypes. (bug 1365879 part 14, r=mattwoodrow)
gfx/layers/composite/LayerManagerComposite.h
gfx/layers/ipc/LayerTransactionParent.cpp
--- a/gfx/layers/composite/LayerManagerComposite.h
+++ b/gfx/layers/composite/LayerManagerComposite.h
@@ -113,16 +113,17 @@ public:
   virtual void NotifyShadowTreeTransaction() {}
   virtual void BeginTransactionWithDrawTarget(gfx::DrawTarget* aTarget,
                                               const gfx::IntRect& aRect) = 0;
   virtual Compositor* GetCompositor() const = 0;
   virtual TextureSourceProvider* GetTextureSourceProvider() const = 0;
   virtual void EndTransaction(const TimeStamp& aTimeStamp,
                               EndTransactionFlags aFlags = END_DEFAULT) = 0;
   virtual void UpdateRenderBounds(const gfx::IntRect& aRect) {}
+  virtual void SetDiagnosticTypes(DiagnosticTypes aDiagnostics) {}
 
   virtual HostLayerManager* AsHostLayerManager() override {
     return this;
   }
 
   void ExtractImageCompositeNotifications(nsTArray<ImageCompositeNotificationInfo>* aNotifications)
   {
     aNotifications->AppendElements(Move(mImageCompositeNotifications));
@@ -411,16 +412,19 @@ public:
 
 public:
   virtual TextureFactoryIdentifier GetTextureFactoryIdentifier() override {
     return mCompositor->GetTextureFactoryIdentifier();
   }
   virtual LayersBackend GetBackendType() override {
     return mCompositor ? mCompositor->GetBackendType() : LayersBackend::LAYERS_NONE;
   }
+  virtual void SetDiagnosticTypes(DiagnosticTypes aDiagnostics) override {
+    mCompositor->SetDiagnosticTypes(aDiagnostics);
+  }
 
   void ForcePresent() override { mCompositor->ForcePresent(); }
 
 private:
   /** Region we're clipping our current drawing to. */
   nsIntRegion mClippingRegion;
   gfx::IntRect mRenderBounds;
 
--- a/gfx/layers/ipc/LayerTransactionParent.cpp
+++ b/gfx/layers/ipc/LayerTransactionParent.cpp
@@ -268,18 +268,17 @@ LayerTransactionParent::RecvUpdate(const
       if (!BindLayer(layer, edit.get_OpCreateRefLayer())) {
         return IPC_FAIL_NO_REASON(this);
       }
 
       UpdateHitTestingTree(layer, "CreateRefLayer");
       break;
     }
     case Edit::TOpSetDiagnosticTypes: {
-      mLayerManager->GetCompositor()->SetDiagnosticTypes(
-        edit.get_OpSetDiagnosticTypes().diagnostics());
+      mLayerManager->SetDiagnosticTypes(edit.get_OpSetDiagnosticTypes().diagnostics());
       break;
     }
     case Edit::TOpWindowOverlayChanged: {
       mLayerManager->SetWindowOverlayChanged();
       break;
     }
     // Tree ops
     case Edit::TOpSetRoot: {