Bug 1128527 - Only create an APZCTreeManager for widgets for toplevel and child windows. r=kats,Bas
authorBotond Ballo <botond@mozilla.com>
Wed, 04 Feb 2015 12:53:07 -0500
changeset 227740 35b05b3a542c1c414b1c0b557f014c094acff23c
parent 227739 40adc4e993432fb31c0c7290b6340ac8f9705863
child 227741 e6112488026a1a650868da324fd6f044bbc7a068
push id28238
push userkwierso@gmail.com
push dateFri, 06 Feb 2015 00:55:16 +0000
treeherderautoland@7c5f187b65bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats, Bas
bugs1128527
milestone38.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 1128527 - Only create an APZCTreeManager for widgets for toplevel and child windows. r=kats,Bas
widget/nsBaseWidget.cpp
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -1022,17 +1022,18 @@ void nsBaseWidget::CreateCompositor(int 
   CreateCompositorVsyncDispatcher();
   mCompositorParent = NewCompositorParent(aWidth, aHeight);
   MessageChannel *parentChannel = mCompositorParent->GetIPCChannel();
   nsRefPtr<ClientLayerManager> lm = new ClientLayerManager(this);
   MessageLoop *childMessageLoop = CompositorParent::CompositorLoop();
   mCompositorChild = new CompositorChild(lm);
   mCompositorChild->Open(parentChannel, childMessageLoop, ipc::ChildSide);
 
-  if (gfxPrefs::AsyncPanZoomEnabled()) {
+  if (gfxPrefs::AsyncPanZoomEnabled() &&
+      (WindowType() == eWindowType_toplevel || WindowType() == eWindowType_child)) {
     ConfigureAPZCTreeManager();
   }
 
   TextureFactoryIdentifier textureFactoryIdentifier;
   PLayerTransactionChild* shadowManager = nullptr;
   nsTArray<LayersBackend> backendHints;
   GetPreferredCompositorBackends(backendHints);