Make EglBase an interface.

Bug: webrtc:8084
Change-Id: I50f57f81fe7148e2ed262e0672d5ab3a4f0f251e
Reviewed-on: https://webrtc-review.googlesource.com/26960
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21026}
diff --git a/sdk/android/api/org/webrtc/EglBase.java b/sdk/android/api/org/webrtc/EglBase.java
index 23acdef..e94037d 100644
--- a/sdk/android/api/org/webrtc/EglBase.java
+++ b/sdk/android/api/org/webrtc/EglBase.java
@@ -12,14 +12,13 @@
 
 import android.graphics.SurfaceTexture;
 import android.view.Surface;
-
 import javax.microedition.khronos.egl.EGL10;
 
 /**
  * Holds EGL state and utility methods for handling an egl 1.0 EGLContext, an EGLDisplay,
  * and an EGLSurface.
  */
-public abstract class EglBase {
+public interface EglBase {
   // EGL wrapper for an actual EGLContext.
   public interface Context { long getNativeEglContext(); }
 
@@ -140,34 +139,34 @@
     return new EglBase14(new EglBase14.Context(sharedContext), configAttributes);
   }
 
-  public abstract void createSurface(Surface surface);
+  void createSurface(Surface surface);
 
   // Create EGLSurface from the Android SurfaceTexture.
-  public abstract void createSurface(SurfaceTexture surfaceTexture);
+  void createSurface(SurfaceTexture surfaceTexture);
 
   // Create dummy 1x1 pixel buffer surface so the context can be made current.
-  public abstract void createDummyPbufferSurface();
+  void createDummyPbufferSurface();
 
-  public abstract void createPbufferSurface(int width, int height);
+  void createPbufferSurface(int width, int height);
 
-  public abstract Context getEglBaseContext();
+  Context getEglBaseContext();
 
-  public abstract boolean hasSurface();
+  boolean hasSurface();
 
-  public abstract int surfaceWidth();
+  int surfaceWidth();
 
-  public abstract int surfaceHeight();
+  int surfaceHeight();
 
-  public abstract void releaseSurface();
+  void releaseSurface();
 
-  public abstract void release();
+  void release();
 
-  public abstract void makeCurrent();
+  void makeCurrent();
 
   // Detach the current EGL context, so that it can be made current on another thread.
-  public abstract void detachCurrent();
+  void detachCurrent();
 
-  public abstract void swapBuffers();
+  void swapBuffers();
 
-  public abstract void swapBuffers(long presentationTimeStampNs);
+  void swapBuffers(long presentationTimeStampNs);
 }
diff --git a/sdk/android/src/java/org/webrtc/EglBase10.java b/sdk/android/src/java/org/webrtc/EglBase10.java
index 8cbe0c0..d00388e 100644
--- a/sdk/android/src/java/org/webrtc/EglBase10.java
+++ b/sdk/android/src/java/org/webrtc/EglBase10.java
@@ -25,7 +25,7 @@
  * Holds EGL state and utility methods for handling an egl 1.0 EGLContext, an EGLDisplay,
  * and an EGLSurface.
  */
-class EglBase10 extends EglBase {
+class EglBase10 implements EglBase {
   // This constant is taken from EGL14.EGL_CONTEXT_CLIENT_VERSION.
   private static final int EGL_CONTEXT_CLIENT_VERSION = 0x3098;
 
diff --git a/sdk/android/src/java/org/webrtc/EglBase14.java b/sdk/android/src/java/org/webrtc/EglBase14.java
index ed5e954..41bd665 100644
--- a/sdk/android/src/java/org/webrtc/EglBase14.java
+++ b/sdk/android/src/java/org/webrtc/EglBase14.java
@@ -27,7 +27,7 @@
  */
 @SuppressWarnings("ReferenceEquality") // We want to compare to EGL14 constants.
 @TargetApi(18)
-class EglBase14 extends EglBase {
+class EglBase14 implements EglBase {
   private static final String TAG = "EglBase14";
   private static final int EGLExt_SDK_VERSION = android.os.Build.VERSION_CODES.JELLY_BEAN_MR2;
   private static final int CURRENT_SDK_VERSION = android.os.Build.VERSION.SDK_INT;