remove dead code
authorBenoit Girard <b56girard@gmail.com>
Tue, 14 Feb 2012 18:36:33 -0500
changeset 89140 c8e21328ea718bbeda10e5f85a80b62b16cab865
parent 89139 50131aed675e85ad6dc480230eba0a14af05b873
child 89141 c9d132f3769825cc21225033406a0e6cb00b8d97
push id22242
push userkgupta@mozilla.com
push dateWed, 14 Mar 2012 15:19:09 +0000
treeherdermozilla-central@936ef50fa498 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone13.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
remove dead code
gfx/layers/ipc/CompositorParent.cpp
gfx/layers/ipc/CompositorParent.h
widget/android/AndroidBridge.cpp
widget/android/AndroidBridge.h
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -176,19 +176,16 @@ CompositorParent::Composite()
   }
 
 #ifdef MOZ_WIDGET_ANDROID
   RequestViewTransform();
   Layer* layer = GetPrimaryScrollableLayer();
   printf_stderr("Correcting for position fixed %i, %i\n", -mScrollOffset.x, -mScrollOffset.y);
   ViewTransform v(mScrollOffset, mXScale, mYScale);
   TransformShadowTree(layer, v);
-#else
-  Layer* layer = mLayerManager->GetRoot();
-  //layer->AsShadowLayer()->SetShadowTransform(worldTransform);
 #endif
 
   mLayerManager->EndEmptyTransaction();
 
 #ifdef COMPOSITOR_PERFORMANCE_WARNING
   if (mExpectedComposeTime + TimeDuration::FromMilliseconds(15) < mozilla::TimeStamp::Now()) {
     printf_stderr("Compositor: Compose frame took %i time then expected.\n",
                   (int)(mozilla::TimeStamp::Now() - mExpectedComposeTime).ToMilliseconds());
@@ -325,43 +322,16 @@ CompositorParent::AsyncRender()
     return;
   }
 
   Layer* root = mLayerManager->GetRoot();
   if (!root) {
     return;
   }
 
-/*
-  ContainerLayer* container = root->AsContainerLayer();
-  if (!container)
-    return;
-
-  FrameMetrics metrics = container->GetFrameMetrics();
-    printf("FrameMetrics: mViewPort: X: %d, Y: %d, Width: %d, Height: %d ",
-            metrics.mViewport.X(), metrics.mViewport.Y(), metrics.mViewport.Width(),
-            metrics.mViewport.Height());
-    printf("mDisplayPort: X: %d, Y: %d, Width: %d, Height: %d ",
-            metrics.mDisplayPort.X(), metrics.mDisplayPort.Y(), metrics.mDisplayPort.Width(),
-            metrics.mDisplayPort.Height());
-    printf("mContentSize: width: %d, height: %d ", metrics.mContentSize.width,
-           metrics. mContentSize.height);
-    printf("mViewPortScrollOffset: x: %d, y: %d\n",
-            metrics.mViewportScrollOffset.x,
-            metrics.mViewportScrollOffset.y);
-    // Modify framemetrics here, just as a test.
-  metrics.mScrollId = FrameMetrics::ROOT_SCROLL_ID;
-  container->SetFrameMetrics(metrics);
-*/
-
-#if 0
-  ViewTransform transform;
-  TransformShadowTree(root, transform);
-#endif
-
   ScheduleComposition();
 }
 
 #ifdef MOZ_WIDGET_ANDROID
 void
 CompositorParent::RequestViewTransform()
 {
   mozilla::AndroidBridge::Bridge()->GetViewTransform(mScrollOffset, mXScale, mYScale);
--- a/gfx/layers/ipc/CompositorParent.h
+++ b/gfx/layers/ipc/CompositorParent.h
@@ -99,26 +99,26 @@ public:
   void SetTransformation(float aScale, nsIntPoint aScrollOffset);
   void AsyncRender();
 
   // Can be called from any thread
   void ScheduleRenderOnCompositorThread(::base::Thread &aCompositorThread);
   void SchedulePauseOnCompositorThread(::base::Thread &aCompositorThread);
   void ScheduleResumeOnCompositorThread(::base::Thread &aCompositorThread);
 
-  void PauseComposition();
-  void ResumeComposition();
-
 protected:
   virtual PLayersParent* AllocPLayers(const LayersBackend &backendType);
   virtual bool DeallocPLayers(PLayersParent* aLayers);
 
 private:
+  void PauseComposition();
+  void ResumeComposition();
+
+  void Composite();
   void ScheduleComposition();
-  void Composite();
   void TransformShadowTree(Layer* aLayer, const ViewTransform& aTransform,
                            float aTempScaleDiffX = 1.0,
                            float aTempScaleDiffY = 1.0);
 
   // Platform specific functions
 #ifdef MOZ_WIDGET_ANDROID
   /**
    * Asks Java for the viewport position and updates the world transform
--- a/widget/android/AndroidBridge.cpp
+++ b/widget/android/AndroidBridge.cpp
@@ -1090,42 +1090,16 @@ AndroidBridge::RegisterCompositor()
 
 EGLSurface
 AndroidBridge::ProvideEGLSurface()
 {
     sController.WaitForValidSurface();
     return sController.ProvideEGLSurface();
 }
 
-void
-AndroidBridge::PerformPreRenderHook()
-{
-    JNIEnv *env = GetJNIForThread();
-    if (!env) {
-        return;
-    }
-
-    AutoLocalJNIFrame jniFrame(env, 3);
-
-    // TODO
-}
-
-void
-AndroidBridge::PerformPostRenderHook()
-{
-    JNIEnv *env = GetJNIForThread();
-    if (!env) {
-        return;
-    }
-
-    AutoLocalJNIFrame jniFrame(env, 3);
-
-    // TODO
-}
-
 bool
 AndroidBridge::GetStaticIntField(const char *className, const char *fieldName, PRInt32* aInt)
 {
     ALOG_BRIDGE("AndroidBridge::GetStaticIntField %s", fieldName);
     JNIEnv *env = GetJNIEnv();
     if (!env)
         return false;
 
--- a/widget/android/AndroidBridge.h
+++ b/widget/android/AndroidBridge.h
@@ -327,18 +327,16 @@ public:
     };
 
     /* See GLHelpers.java as to why this is needed */
     void *CallEglCreateWindowSurface(void *dpy, void *config, AndroidGeckoSurfaceView& surfaceView);
 
     // Switch Java to composite with the Gecko Compositor thread
     void RegisterCompositor();
     EGLSurface ProvideEGLSurface();
-    void PerformPreRenderHook();
-    void PerformPostRenderHook();
 
     bool GetStaticStringField(const char *classID, const char *field, nsAString &result);
 
     bool GetStaticIntField(const char *className, const char *fieldName, PRInt32* aInt);
 
     void SetKeepScreenOn(bool on);
 
     void ScanMedia(const nsAString& aFile, const nsACString& aMimeType);
@@ -532,18 +530,16 @@ protected:
     jclass jEGLConfigImplClass;
     jclass jEGLDisplayImplClass;
     jclass jEGLContextClass;
     jclass jEGL10Class;
 
     jclass jFlexSurfaceView;
 
     jmethodID jRegisterCompositorMethod;
-    jmethodID jPerformPreRenderHookMethod;
-    jmethodID jPerformPostRenderHookMethod;
 
     // calls we've dlopened from libjnigraphics.so
     int (* AndroidBitmap_getInfo)(JNIEnv *env, jobject bitmap, void *info);
     int (* AndroidBitmap_lockPixels)(JNIEnv *env, jobject bitmap, void **buffer);
     int (* AndroidBitmap_unlockPixels)(JNIEnv *env, jobject bitmap);
 
     void* (*ANativeWindow_fromSurface)(JNIEnv *env, jobject surface);
     void (*ANativeWindow_release)(void *window);