Clean up
authorAli Juma <ajuma@mozilla.com>
Tue, 20 Dec 2011 15:12:54 -0500
changeset 92338 b8c022acb96ee8f2ced32e8d4646e06ba5fef6e6
parent 92337 f31cc58895d913cdaed2ef0aacb61d0313996469
child 92339 0d11124ed86e1d75d9404a94588cc524ddd21aa8
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone11.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
Clean up
gfx/layers/ipc/CompositorChild.cpp
gfx/layers/ipc/CompositorChild.h
gfx/layers/ipc/CompositorParent.cpp
gfx/layers/ipc/CompositorParent.h
gfx/layers/ipc/ShadowLayersChild.cpp
--- a/gfx/layers/ipc/CompositorChild.cpp
+++ b/gfx/layers/ipc/CompositorChild.cpp
@@ -17,16 +17,17 @@
  *
  * The Initial Developer of the Original Code is
  *   The Mozilla Foundation.
  * Portions created by the Initial Developer are Copyright (C) 2011
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Benoit Girard <bgirard@mozilla.com>
+ *   Ali Juma <ajuma@mozilla.com>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
@@ -54,23 +55,23 @@ CompositorChild::CompositorChild(Thread 
   : mCompositorThread(aCompositorThread)
   , mLayerManager(aLayerManager)
 {
   MOZ_COUNT_CTOR(CompositorChild);
 }
 
 CompositorChild::~CompositorChild()
 {
-  printf("del compositor child\n");
   MOZ_COUNT_DTOR(CompositorChild);
 }
 
 void
 CompositorChild::Destroy()
 {
+  mLayerManager = NULL;
   SendStop();
 }
 
 CompositorChild*
 CompositorChild::CreateCompositor(LayerManager *aLayerManager,
                                   CompositorParent *aCompositorParent)
 {
   Thread* compositorThread = new Thread("CompositorThread");
@@ -107,16 +108,15 @@ PLayersChild*
 CompositorChild::AllocPLayers(const LayersBackend &backend, const WidgetDescriptor &widget)
 {
   return new ShadowLayersChild();;
 }
 
 bool
 CompositorChild::DeallocPLayers(PLayersChild* actor)
 {
-  printf("actor destroy\n");
   delete actor;
   return true;
 }
 
 } // namespace layers
 } // namespace mozilla
 
--- a/gfx/layers/ipc/CompositorChild.h
+++ b/gfx/layers/ipc/CompositorChild.h
@@ -70,18 +70,17 @@ protected:
 
   virtual PLayersChild* AllocPLayers(const LayersBackend &aBackend, const WidgetDescriptor &aWidget);
   virtual bool DeallocPLayers(PLayersChild *aChild);
 
   virtual bool RecvNativeContextCreated(const NativeContext &aNativeContext);
 
 private:
   Thread *mCompositorThread;
-  LayerManager *mLayerManager;
-  nsRefPtr<CompositorParent> mCompositorParent;
+  nsRefPtr<LayerManager> mLayerManager;
 
   DISALLOW_EVIL_CONSTRUCTORS(CompositorChild);
 };
 
-} // lauers
+} // layers
 } // mozilla
 
 #endif // mozilla_layers_CompositorChild_h
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -17,16 +17,17 @@
  *
  * The Initial Developer of the Original Code is
  *   The Mozilla Foundation.
  * Portions created by the Initial Developer are Copyright (C) 2011
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Benoit Girard <bgirard@mozilla.com>
+ *   Ali Juma <ajuma@mozilla.com>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
@@ -40,25 +41,23 @@
 #include "CompositorParent.h"
 #include "ShadowLayersParent.h"
 #include "LayerManagerOGL.h"
 
 namespace mozilla {
 namespace layers {
 
 CompositorParent::CompositorParent()
-  : mLayerManager(NULL)
 {
 
   MOZ_COUNT_CTOR(CompositorParent);
 }
 
 CompositorParent::~CompositorParent()
 {
-  printf("delete parent\n");
   MOZ_COUNT_DTOR(CompositorParent);
 }
 
 bool
 CompositorParent::RecvInit()
 {
   CancelableTask *composeTask = NewRunnableMethod(this, &CompositorParent::Composite);
   MessageLoop::current()->PostTask(FROM_HERE, composeTask);
--- a/gfx/layers/ipc/CompositorParent.h
+++ b/gfx/layers/ipc/CompositorParent.h
@@ -17,16 +17,17 @@
  *
  * The Initial Developer of the Original Code is
  *   The Mozilla Foundation.
  * Portions created by the Initial Developer are Copyright (C) 2011
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Benoit Girard <bgirard@mozilla.com>
+ *   Ali Juma <ajuma@mozilla.com>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
--- a/gfx/layers/ipc/ShadowLayersChild.cpp
+++ b/gfx/layers/ipc/ShadowLayersChild.cpp
@@ -42,17 +42,16 @@
 #include "ShadowLayersChild.h"
 
 namespace mozilla {
 namespace layers {
 
 void
 ShadowLayersChild::Destroy()
 {
-  printf("Destroy shadow layers\n");
   NS_ABORT_IF_FALSE(0 == ManagedPLayerChild().Length(),
                     "layers should have been cleaned up by now");
   PLayersChild::Send__delete__(this);
   // WARNING: |this| has gone to the great heap in the sky
 }
 
 PLayerChild*
 ShadowLayersChild::AllocPLayer()