Remove RemoveAbstractView, pushing new head
authorBenoit Girard <b56girard@gmail.com>
Wed, 08 Feb 2012 10:46:26 -0500
changeset 90905 a2fd750c31e79a1584a5384a95998b58f4edc141
parent 90896 ae574286846aeeab057b016a16b5fedbca8139ee
child 90906 7cb18d202ecba233cb8debc466d52bb5c4f489cd
push idunknown
push userunknown
push dateunknown
milestone12.0a1
Remove RemoveAbstractView, pushing new head
mobile/android/base/GeckoApp.java
mobile/android/base/GeckoAppShell.java
mobile/android/base/GeckoInputConnection.java
mobile/android/base/Makefile.in
mobile/android/base/gfx/AbstractLayerView.java
mobile/android/base/gfx/Layer.java
mobile/android/base/gfx/LayerClient.java
mobile/android/base/gfx/LayerController.java
mobile/android/base/gfx/LayerRenderer.java
mobile/android/base/gfx/LayerView.java
mobile/android/base/gfx/MultiTileLayer.java
mobile/android/base/gfx/layers/OGLSurfaceView.java
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1607,17 +1607,17 @@ abstract public class GeckoApp
              *
              * TODO: Fall back to a built-in screenshot of the Fennec Start page for a nice first-
              * run experience, perhaps?
              */
             mLayerController = new LayerController(this);
             mPlaceholderLayerClient = PlaceholderLayerClient.createInstance(this);
             mLayerController.setLayerClient(mPlaceholderLayerClient);
 
-            mGeckoLayout.addView(mLayerController.getView().getAndroidView(), 0);
+            mGeckoLayout.addView(mLayerController.getView(), 0);
         }
 
         mPluginContainer = (AbsoluteLayout) findViewById(R.id.plugin_container);
 
         Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - UI almost up");
 
         if (!sTryCatchAttached) {
             sTryCatchAttached = true;
--- a/mobile/android/base/GeckoAppShell.java
+++ b/mobile/android/base/GeckoAppShell.java
@@ -36,17 +36,17 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 package org.mozilla.gecko;
 
 import org.mozilla.gecko.gfx.BitmapUtils;
 import org.mozilla.gecko.gfx.GeckoLayerClient;
 import org.mozilla.gecko.gfx.LayerController;
-import org.mozilla.gecko.gfx.AbstractLayerView;
+import org.mozilla.gecko.gfx.LayerView;
 
 import java.io.*;
 import java.lang.reflect.*;
 import java.nio.*;
 import java.nio.channels.*;
 import java.text.*;
 import java.util.*;
 import java.util.zip.*;
@@ -496,17 +496,17 @@ public class GeckoAppShell
 
         // and go
         GeckoAppShell.nativeRun(combinedArgs);
     }
 
     // Called on the UI thread after Gecko loads.
     private static void geckoLoaded() {
         final LayerController layerController = GeckoApp.mAppContext.getLayerController();
-        AbstractLayerView v = layerController.getView();
+        LayerView v = layerController.getView();
         mInputConnection = v.setInputConnectionHandler();
 
         layerController.setOnTouchListener(new View.OnTouchListener() {
             public boolean onTouch(View view, MotionEvent event) {
                 if (event == null)
                     return true;
                 GeckoAppShell.sendEventToGecko(new GeckoEvent(event));
                 return true;
@@ -581,17 +581,17 @@ public class GeckoAppShell
         if (tmp != null)
             tmp.countDown();
     }
 
     static Sensor gAccelerometerSensor = null;
     static Sensor gOrientationSensor = null;
 
     public static void enableDeviceMotion(boolean enable) {
-        AbstractLayerView v = GeckoApp.mAppContext.getLayerController().getView();
+        LayerView v = GeckoApp.mAppContext.getLayerController().getView();
         SensorManager sm = (SensorManager) v.getContext().getSystemService(Context.SENSOR_SERVICE);
 
         if (gAccelerometerSensor == null || gOrientationSensor == null) {
             gAccelerometerSensor = sm.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
             gOrientationSensor   = sm.getDefaultSensor(Sensor.TYPE_ORIENTATION);
         }
 
         if (enable) {
@@ -605,18 +605,16 @@ public class GeckoAppShell
             if (gOrientationSensor != null)
                 sm.unregisterListener(GeckoApp.mAppContext, gOrientationSensor);
         }
     }
 
     public static void enableLocation(final boolean enable) {
         getMainHandler().post(new Runnable() { 
                 public void run() {
-                    //AbstractLayerView v = GeckoApp.mAppContext.getLayerController().getView();
-
                     LocationManager lm = (LocationManager)
                         GeckoApp.mAppContext.getSystemService(Context.LOCATION_SERVICE);
 
                     if (enable) {
                         Criteria criteria = new Criteria();
                         String provider = lm.getBestProvider(criteria, true);
                         if (provider == null)
                             return;
@@ -1079,25 +1077,25 @@ public class GeckoAppShell
 
     public static String showFilePicker(String aFilters) {
         return GeckoApp.mAppContext.
             showFilePicker(getMimeTypeFromExtensions(aFilters));
     }
 
     public static void performHapticFeedback(boolean aIsLongPress) {
         LayerController layerController = GeckoApp.mAppContext.getLayerController();
-        AbstractLayerView layerView = layerController.getView();
-        layerView.getAndroidView().performHapticFeedback(aIsLongPress ?
+        LayerView layerView = layerController.getView();
+        layerView.performHapticFeedback(aIsLongPress ?
                                         HapticFeedbackConstants.LONG_PRESS :
                                         HapticFeedbackConstants.VIRTUAL_KEY);
     }
 
     private static Vibrator vibrator() {
         LayerController layerController = GeckoApp.mAppContext.getLayerController();
-        AbstractLayerView layerView = layerController.getView();
+        LayerView layerView = layerController.getView();
 
         return (Vibrator) layerView.getContext().getSystemService(Context.VIBRATOR_SERVICE);
     }
 
     public static void vibrate(long milliseconds) {
         vibrator().vibrate(milliseconds);
     }
 
@@ -1769,17 +1767,17 @@ public class GeckoAppShell
     public static void emitGeckoAccessibilityEvent (int eventType, String role, String text, String description, boolean enabled, boolean checked, boolean password) {
         AccessibilityManager accessibilityManager =
             (AccessibilityManager) GeckoApp.mAppContext.getSystemService(Context.ACCESSIBILITY_SERVICE);
 
         if (!accessibilityManager.isEnabled())
             return;
 
         LayerController layerController = GeckoApp.mAppContext.getLayerController();
-        AbstractLayerView layerView = layerController.getView();
+        LayerView layerView = layerController.getView();
 
         AccessibilityEvent event = AccessibilityEvent.obtain(eventType);
         event.setClassName(layerView.getClass().getName() + "$" + role);
         event.setPackageName(GeckoApp.mAppContext.getPackageName());
         event.setEnabled(enabled);
         event.setChecked(checked);
         event.setPassword(password);
         event.setContentDescription(description);
--- a/mobile/android/base/GeckoInputConnection.java
+++ b/mobile/android/base/GeckoInputConnection.java
@@ -380,17 +380,17 @@ public class GeckoInputConnection
                                                        mEditable.toString()));
                 setEditable(text);
             }
         }
 
         if (mUpdateRequest == null)
             return;
 
-        View v = GeckoApp.mAppContext.getLayerController().getView().getAndroidView();
+        View v = GeckoApp.mAppContext.getLayerController().getView();
 
         if (imm == null) {
             imm = (InputMethodManager)v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
             if (imm == null)
                 return;
         }
 
         mUpdateExtract.flags = 0;
@@ -431,17 +431,17 @@ public class GeckoInputConnection
                 if (start < ca || start > cb || end < ca || end > cb) {
                     if (DEBUG) Log.d(LOGTAG, ". . . notifySelectionChange: removeComposingSpans");
                     removeComposingSpans(content);
                 }
             }
         }
 
         if (imm != null && imm.isFullscreenMode()) {
-            View v = GeckoApp.mAppContext.getLayerController().getView().getAndroidView();
+            View v = GeckoApp.mAppContext.getLayerController().getView();
             imm.updateSelection(v, start, end, -1, -1);
         }
     }
 
     public void reset() {
         mComposing = false;
         mCompositionStart = -1;
         mBatchMode = false;
@@ -664,17 +664,17 @@ public class GeckoInputConnection
                 break;
         }
 
         if (isPreIme && mIMEState != IME_STATE_DISABLED &&
             (event.getMetaState() & KeyEvent.META_ALT_ON) != 0)
             // Let active IME process pre-IME key events
             return false;
 
-        View v = GeckoApp.mAppContext.getLayerController().getView().getAndroidView();
+        View v = GeckoApp.mAppContext.getLayerController().getView();
 
         // KeyListener returns true if it handled the event for us.
         if (mIMEState == IME_STATE_DISABLED ||
                 keyCode == KeyEvent.KEYCODE_ENTER ||
                 keyCode == KeyEvent.KEYCODE_DEL ||
                 keyCode == KeyEvent.KEYCODE_TAB ||
                 (event.getFlags() & KeyEvent.FLAG_SOFT_KEYBOARD) != 0 ||
                 !mKeyListener.onKeyDown(v, mEditable, keyCode, event)) {
@@ -706,34 +706,34 @@ public class GeckoInputConnection
                 break;
         }
 
         if (isPreIme && mIMEState != IME_STATE_DISABLED &&
             (event.getMetaState() & KeyEvent.META_ALT_ON) != 0)
             // Let active IME process pre-IME key events
             return false;
 
-        View v = GeckoApp.mAppContext.getLayerController().getView().getAndroidView();
+        View v = GeckoApp.mAppContext.getLayerController().getView();
 
         if (mIMEState == IME_STATE_DISABLED ||
             keyCode == KeyEvent.KEYCODE_ENTER ||
             keyCode == KeyEvent.KEYCODE_DEL ||
             (event.getFlags() & KeyEvent.FLAG_SOFT_KEYBOARD) != 0 ||
             !mKeyListener.onKeyUp(v, mEditable, keyCode, event))
             GeckoAppShell.sendEventToGecko(new GeckoEvent(event));
         return true;
     }
 
     public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) {
         GeckoAppShell.sendEventToGecko(new GeckoEvent(event));
         return true;
     }
 
     public boolean onKeyLongPress(int keyCode, KeyEvent event) {
-        View v = GeckoApp.mAppContext.getLayerController().getView().getAndroidView();
+        View v = GeckoApp.mAppContext.getLayerController().getView();
         switch (keyCode) {
             case KeyEvent.KEYCODE_MENU:
                 InputMethodManager imm = (InputMethodManager)
                     v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
                 imm.toggleSoftInputFromWindow(v.getWindowToken(),
                                               imm.SHOW_FORCED, 0);
                 return true;
             default:
@@ -743,17 +743,17 @@ public class GeckoInputConnection
     }
 
     public boolean isIMEEnabled() {
         // make sure this picks up PASSWORD and PLUGIN states as well
         return mIMEState != IME_STATE_DISABLED;
     }
 
     public void notifyIME(int type, int state) {
-        View v = GeckoApp.mAppContext.getLayerController().getView().getAndroidView();
+        View v = GeckoApp.mAppContext.getLayerController().getView();
 
         if (v == null)
             return;
 
         switch (type) {
         case NOTIFY_IME_RESETINPUTSTATE:
             if (DEBUG) Log.d(LOGTAG, ". . . notifyIME: reset");
 
@@ -787,33 +787,33 @@ public class GeckoInputConnection
             IMEStateUpdater.resetIME();
             break;
         }
     }
 
     public void notifyIMEEnabled(int state, String typeHint,
                                         String actionHint, boolean landscapeFS)
     {
-        View v = GeckoApp.mAppContext.getLayerController().getView().getAndroidView();
+        View v = GeckoApp.mAppContext.getLayerController().getView();
 
         if (v == null)
             return;
 
         /* When IME is 'disabled', IME processing is disabled.
            In addition, the IME UI is hidden */
         mIMEState = state;
         mIMETypeHint = typeHint;
         mIMEActionHint = actionHint;
         mIMELandscapeFS = landscapeFS;
         IMEStateUpdater.enableIME();
     }
 
 
     public void notifyIMEChange(String text, int start, int end, int newEnd) {
-        View v = GeckoApp.mAppContext.getLayerController().getView().getAndroidView();
+        View v = GeckoApp.mAppContext.getLayerController().getView();
 
         if (v == null)
             return;
 
         InputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
         if (imm == null)
             return;
 
@@ -862,17 +862,17 @@ public class GeckoInputConnection
         }
 
         public void run() {
             if (DEBUG) Log.d(LOGTAG, "IME: run()");
             synchronized(IMEStateUpdater.class) {
                 instance = null;
             }
 
-            View v = GeckoApp.mAppContext.getLayerController().getView().getAndroidView();
+            View v = GeckoApp.mAppContext.getLayerController().getView();
             if (DEBUG) Log.d(LOGTAG, "IME: v="+v);
 
             InputMethodManager imm = (InputMethodManager) v.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
             if (imm == null)
                 return;
 
             if (mReset)
                 imm.restartInput(v);
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -96,17 +96,16 @@ FENNEC_JAVA_FILES = \
   sqlite/ByteBufferInputStream.java \
   sqlite/SQLiteBridge.java \
   sqlite/SQLiteBridgeException.java \
   SetupScreen.java \
   SurfaceLockInfo.java \
   Tab.java \
   Tabs.java \
   TabsTray.java \
-  gfx/AbstractLayerView.java \
   gfx/BitmapUtils.java \
   gfx/BufferedCairoImage.java \
   gfx/CairoGLInfo.java \
   gfx/CairoImage.java \
   gfx/CairoUtils.java \
   gfx/CheckerboardImage.java \
   gfx/FlexibleGLSurfaceView.java \
   gfx/FloatSize.java \
deleted file mode 100644
--- a/mobile/android/base/gfx/AbstractLayerView.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*-
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Android code.
- *
- * The Initial Developer of the Original Code is Mozilla Foundation.
- * Portions created by the Initial Developer are Copyright (C) 2009-2010
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Benoit Girard <bgirard@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
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-package org.mozilla.gecko.gfx;
-
-import android.content.Context;
-import android.widget.RelativeLayout;
-import android.view.View;
-
-import org.mozilla.gecko.gfx.LayerController;
-import org.mozilla.gecko.gfx.InputConnectionHandler;
-import org.mozilla.gecko.GeckoInputConnection;
-
-public interface AbstractLayerView {
-    public LayerController getController();
-    public GeckoInputConnection setInputConnectionHandler();
-    public View getAndroidView();
-    /** The LayerRenderer calls this to indicate that the window has changed size. */
-    public void setViewportSize(IntSize size);
-    public void requestRender();
-    public boolean post(Runnable action);
-    public boolean postDelayed(Runnable action, long delayMillis);
-    public Context getContext();
-    public int getMaxTextureSize();
-    public void clearEventQueue();
-    public void processEventQueue();
-}
-
--- a/mobile/android/base/gfx/Layer.java
+++ b/mobile/android/base/gfx/Layer.java
@@ -48,17 +48,17 @@ import org.mozilla.gecko.FloatUtils;
 
 public abstract class Layer {
     private final ReentrantLock mTransactionLock;
     private boolean mInTransaction;
     private Point mOrigin;
     private Point mNewOrigin;
     private float mResolution;
     private float mNewResolution;
-    private AbstractLayerView mView;
+    private LayerView mView;
 
     public Layer() {
         mTransactionLock = new ReentrantLock();
         mOrigin = new Point(0, 0);
         mResolution = 1.0f;
     }
 
     /**
@@ -106,17 +106,17 @@ public abstract class Layer {
 
     /**
      * Call this before modifying the layer. Note that, for TileLayers, "modifying the layer"
      * includes altering the underlying CairoImage in any way. Thus you must call this function
      * before modifying the byte buffer associated with this layer.
      *
      * This function may block, so you should never call this on the main UI thread.
      */
-    public void beginTransaction(AbstractLayerView aView) {
+    public void beginTransaction(LayerView aView) {
         if (mTransactionLock.isHeldByCurrentThread())
             throw new RuntimeException("Nested transactions are not supported");
         mTransactionLock.lock();
         mView = aView;
         mInTransaction = true;
     }
 
     public void beginTransaction() {
--- a/mobile/android/base/gfx/LayerClient.java
+++ b/mobile/android/base/gfx/LayerClient.java
@@ -49,21 +49,21 @@ public abstract class LayerClient {
 
     public LayerController getLayerController() { return mLayerController; }
     public void setLayerController(LayerController layerController) {
         mLayerController = layerController;
     }
 
     /**
      * A utility function for calling Layer.beginTransaction with the
-     * appropriate AbstractLayerView.
+     * appropriate LayerView.
      */
     public void beginTransaction(Layer aLayer) {
         if (mLayerController != null) {
-            AbstractLayerView view = mLayerController.getView();
+            LayerView view = mLayerController.getView();
             if (view != null) {
                 aLayer.beginTransaction(view);
                 return;
             }
         }
 
         aLayer.beginTransaction();
     }
--- a/mobile/android/base/gfx/LayerController.java
+++ b/mobile/android/base/gfx/LayerController.java
@@ -36,17 +36,16 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 package org.mozilla.gecko.gfx;
 
 import org.mozilla.gecko.gfx.IntSize;
 import org.mozilla.gecko.gfx.Layer;
 import org.mozilla.gecko.gfx.LayerClient;
-import org.mozilla.gecko.gfx.AbstractLayerView;
 import org.mozilla.gecko.ui.PanZoomController;
 import org.mozilla.gecko.ui.SimpleScaleGestureDetector;
 import org.mozilla.gecko.GeckoApp;
 import org.mozilla.gecko.GeckoEvent;
 import android.content.Context;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
@@ -70,17 +69,17 @@ import java.util.TimerTask;
  * to a higher-level view.
  *
  * Many methods require that the monitor be held, with a synchronized (controller) { ... } block.
  */
 public class LayerController {
     private static final String LOGTAG = "GeckoLayerController";
 
     private Layer mRootLayer;                   /* The root layer. */
-    private AbstractLayerView mView;            /* The main rendering view. */
+    private LayerView mView;                    /* The main rendering view. */
     private Context mContext;                   /* The current context. */
     private ViewportMetrics mViewportMetrics;   /* The current viewport metrics. */
     private boolean mWaitForTouchListeners;
 
     private PanZoomController mPanZoomController;
     /*
      * The panning and zooming controller, which interprets pan and zoom gestures for us and
      * updates our visible rect appropriately.
@@ -131,17 +130,17 @@ public class LayerController {
     }
 
     public void setForceRedraw() {
         mForceRedraw = true;
     }
 
     public LayerClient getLayerClient()           { return mLayerClient; }
     public Layer getRoot()                        { return mRootLayer; }
-    public AbstractLayerView getView()            { return mView; }
+    public LayerView getView()                    { return mView; }
     public Context getContext()                   { return mContext; }
     public ViewportMetrics getViewportMetrics()   { return mViewportMetrics; }
 
     public RectF getViewport() {
         return mViewportMetrics.getViewport();
     }
 
     public FloatSize getViewportSize() {
@@ -398,17 +397,17 @@ public class LayerController {
             if (PointUtils.subtract(point, initialTouchLocation).length() > PanZoomController.PAN_THRESHOLD * 240) {
                 initialTouchLocation = null;
             } else {
                 return !allowDefaultActions;
             }
         }
 
         if (mOnTouchListener != null)
-            mOnTouchListener.onTouch(mView.getAndroidView(), event);
+            mOnTouchListener.onTouch(mView, event);
 
         if (!mWaitForTouchListeners)
             return !allowDefaultActions;
 
         switch (action & MotionEvent.ACTION_MASK) {
             case MotionEvent.ACTION_MOVE: {
                 if (!inTouchSession && allowDefaultTimer == null) {
                     inTouchSession = true;
--- a/mobile/android/base/gfx/LayerRenderer.java
+++ b/mobile/android/base/gfx/LayerRenderer.java
@@ -37,17 +37,16 @@
  * ***** END LICENSE BLOCK ***** */
 
 package org.mozilla.gecko.gfx;
 
 import org.mozilla.gecko.gfx.BufferedCairoImage;
 import org.mozilla.gecko.gfx.IntSize;
 import org.mozilla.gecko.gfx.Layer.RenderContext;
 import org.mozilla.gecko.gfx.LayerController;
-import org.mozilla.gecko.gfx.AbstractLayerView;
 import org.mozilla.gecko.gfx.NinePatchTileLayer;
 import org.mozilla.gecko.gfx.SingleTileLayer;
 import org.mozilla.gecko.gfx.TextureReaper;
 import org.mozilla.gecko.gfx.TextLayer;
 import org.mozilla.gecko.gfx.TileLayer;
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.graphics.Point;
@@ -73,17 +72,17 @@ public class LayerRenderer implements GL
      * The amount of time a frame is allowed to take to render before we declare it a dropped
      * frame.
      */
     private static final int MAX_FRAME_TIME = 16;   /* 1000 ms / 60 FPS */
 
     private static final int FRAME_RATE_METER_WIDTH = 64;
     private static final int FRAME_RATE_METER_HEIGHT = 32;
 
-    private final AbstractLayerView mView;
+    private final LayerView mView;
     private final SingleTileLayer mBackgroundLayer;
     private final CheckerboardImage mCheckerboardImage;
     private final SingleTileLayer mCheckerboardLayer;
     private final NinePatchTileLayer mShadowLayer;
     private final TextLayer mFrameRateLayer;
     private final ScrollbarLayer mHorizScrollLayer;
     private final ScrollbarLayer mVertScrollLayer;
     private final FadeRunnable mFadeRunnable;
@@ -93,17 +92,17 @@ public class LayerRenderer implements GL
     // Dropped frames display
     private int[] mFrameTimings;
     private int mCurrentFrame, mFrameTimingsSum, mDroppedFrames;
     private boolean mShowFrameRate;
 
     /* Used by robocop for testing purposes */
     private IntBuffer mPixelBuffer;
 
-    public LayerRenderer(AbstractLayerView view) {
+    public LayerRenderer(LayerView view) {
         mView = view;
 
         LayerController controller = view.getController();
 
         CairoImage backgroundImage = new BufferedCairoImage(controller.getBackgroundPattern());
         mBackgroundLayer = new SingleTileLayer(true, backgroundImage);
         mBackgroundLayer.beginTransaction(null);
         try {
@@ -258,17 +257,17 @@ public class LayerRenderer implements GL
                 gl.glReadPixels(0, 0, (int)screenContext.viewport.width(), (int)screenContext.viewport.height(), GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, pixelBuffer);
                 pixelBuffer.notify();
             }
         }
     }
 
     /** Used by robocop for testing purposes. Not for production use! */
     IntBuffer getPixels() {
-        IntBuffer pixelBuffer = IntBuffer.allocate(mView.getAndroidView().getWidth() * mView.getAndroidView().getHeight());
+        IntBuffer pixelBuffer = IntBuffer.allocate(mView.getWidth() * mView.getHeight());
         synchronized (pixelBuffer) {
             mPixelBuffer = pixelBuffer;
             mView.requestRender();
             try {
                 pixelBuffer.wait();
             } catch (InterruptedException ie) {
             }
             mPixelBuffer = null;
--- a/mobile/android/base/gfx/LayerView.java
+++ b/mobile/android/base/gfx/LayerView.java
@@ -64,18 +64,17 @@ import org.json.JSONException;
 import org.json.JSONObject;
 
 /**
  * A view rendered by the layer compositor.
  *
  * This view delegates to LayerRenderer to actually do the drawing. Its role is largely that of a
  * mediator between the LayerRenderer and the LayerController.
  */
-public class LayerView extends FlexibleGLSurfaceView implements AbstractLayerView,
-                                                                GeckoEventListener {
+public class LayerView extends FlexibleGLSurfaceView implements GeckoEventListener {
     private Context mContext;
     private LayerController mController;
     private InputConnectionHandler mInputConnectionHandler;
     private LayerRenderer mRenderer;
     private GestureDetector mGestureDetector;
     private SimpleScaleGestureDetector mScaleGestureDetector;
     private long mRenderTime;
     private boolean mRenderTimeReset;
@@ -241,18 +240,14 @@ public class LayerView extends FlexibleG
             return System.nanoTime() - mRenderTime;
         }
     }
 
     public int getMaxTextureSize() {
         return mRenderer.getMaxTextureSize();
     }
 
-    public View getAndroidView() {
-        return this;
-    }
-
     /** Used by robocop for testing purposes. Not for production use! This is called via reflection by robocop. */
     public IntBuffer getPixels() {
         return mRenderer.getPixels();
     }
 }
 
--- a/mobile/android/base/gfx/MultiTileLayer.java
+++ b/mobile/android/base/gfx/MultiTileLayer.java
@@ -378,17 +378,17 @@ public class MultiTileLayer extends Laye
 
         // Remove the update region from the dirty region
         mDirtyRegion.op(updateRegion, Region.Op.XOR);
 
         return mDirtyRegion.isEmpty();
     }
 
     @Override
-    public void beginTransaction(AbstractLayerView aView) {
+    public void beginTransaction(LayerView aView) {
         super.beginTransaction(aView);
 
         for (SubTile layer : mTiles) {
             layer.beginTransaction(aView);
         }
     }
 
     @Override
deleted file mode 100644
--- a/mobile/android/base/gfx/layers/OGLSurfaceView.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*-
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is Mozilla Android code.
- *
- * The Initial Developer of the Original Code is 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>
- *
- * 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
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-package org.mozilla.gecko.gfx.layers;
-
-import android.content.Context;
-import android.view.SurfaceHolder;
-import android.view.SurfaceView;
-import android.util.Log;
-import android.view.View;
-
-import org.mozilla.gecko.GeckoApp;
-import org.mozilla.gecko.gfx.*;
-import org.mozilla.gecko.GeckoInputConnection;
-
-public class OGLSurfaceView implements AbstractLayerView {
-    private static final String LOGTAG = "OGLSurfaceView";
-
-    // Used by registerCompositor to replace the temporary java compositor
-    private static LayerController mLayerController;
-
-    private Context mContext;
-    private LayerController mController;
-    private InputConnectionHandler mInputConnectionHandler;
-
-    public OGLSurfaceView(Context context, LayerController controller) {
-        // Constructed on the main thread
-        mContext = context;
-        mController = controller;
-        System.out.println("construct");
-    }
-
-    public SurfaceHolder getHolder() {
-        System.out.println("Get Holder");
-        return null;
-    }
-
-    // Called from the Java thread
-    public static void registerLayerController(LayerController layerController) {
-        System.out.println("register layer controller");
-        synchronized (OGLSurfaceView.class) {
-            mLayerController = layerController;
-            OGLSurfaceView.class.notifyAll();
-        }
-    }
-
-    // Called from the compositor thread
-    public static void registerCompositor() {
-        System.out.println("register layer comp");
-        synchronized (OGLSurfaceView.class) {
-            // Wait for the layer controller if by some miracle
-            // gecko beats the java thread here.
-            while (mLayerController == null) {
-                try {
-                    OGLSurfaceView.class.wait();
-                } catch (InterruptedException e) {}
-            }
-            final LayerController controller = mLayerController;
-
-            GeckoApp.mAppContext.runOnUiThread(new Runnable() {
-                public void run() {
-                    synchronized (OGLSurfaceView.class) {
-                        OGLSurfaceView surfaceView =
-                            new OGLSurfaceView(controller.getContext(), controller);
-                        OGLSurfaceView.class.notifyAll();
-                    }
-                }
-            });
-
-            // Wait for the compositor to be setup on the
-            // Java UI thread.
-            try {
-                OGLSurfaceView.class.wait();
-            } catch (InterruptedException e) {}
-        }
-
-    }
-
-    public static native void setSurfaceView(SurfaceView sv);
-
-    public LayerController getController() {
-        return mController; 
-    }
-
-    public GeckoInputConnection setInputConnectionHandler() {
-        GeckoInputConnection geckoInputConnection = GeckoInputConnection.create(getAndroidView());
-        mInputConnectionHandler = geckoInputConnection;
-        return geckoInputConnection;
-    }
-
-    public View getAndroidView() {
-        return null;
-    }
-
-    /** The LayerRenderer calls this to indicate that the window has changed size. */
-    public void setViewportSize(IntSize size) {}
-    public void requestRender() {}
-    public boolean post(Runnable action) { return false; }
-    public boolean postDelayed(Runnable action, long delayMillis) { return false; }
-    public Context getContext() { return mContext; }
-    public int getMaxTextureSize() { return 1024; }
-    public void clearEventQueue() {}
-    public void processEventQueue() {}
-
-    private class InternalSurfaceView extends SurfaceView {
-        public InternalSurfaceView() {
-            super(OGLSurfaceView.this.mContext);
-        }
-    }
-}