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}
This commit is contained in:

committed by
Commit Bot

parent
0af8370cb3
commit
b9f3f9bdd7
@ -12,14 +12,13 @@ package org.webrtc;
|
||||
|
||||
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 @@ public abstract class EglBase {
|
||||
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user