Index: talk/app/webrtc/java/android/org/webrtc/EglBase.java |
diff --git a/talk/app/webrtc/java/android/org/webrtc/EglBase.java b/talk/app/webrtc/java/android/org/webrtc/EglBase.java |
index 8262fff9896a761bc5d0af870c2b7eb88026e426..6f816617554e03b306056119b43512629b0472e3 100644 |
--- a/talk/app/webrtc/java/android/org/webrtc/EglBase.java |
+++ b/talk/app/webrtc/java/android/org/webrtc/EglBase.java |
@@ -32,6 +32,7 @@ import android.opengl.EGL14; |
import android.opengl.EGLConfig; |
import android.opengl.EGLContext; |
import android.opengl.EGLDisplay; |
+import android.opengl.EGLExt; |
import android.opengl.EGLSurface; |
import android.view.Surface; |
@@ -206,6 +207,16 @@ public final class EglBase { |
EGL14.eglSwapBuffers(eglDisplay, eglSurface); |
} |
+ public void swapBuffers(long timeStampNs) { |
+ checkIsNotReleased(); |
+ if (eglSurface == EGL14.EGL_NO_SURFACE) { |
+ throw new RuntimeException("No EGLSurface - can't swap buffers"); |
+ } |
+ // See https://android.googlesource.com/platform/frameworks/native/+/tools_r22.2/opengl/specs/EGL_ANDROID_presentation_time.txt |
AlexG
2015/10/14 23:48:27
nit: alignment?
perkj_webrtc
2015/11/16 13:08:51
I remove this for now since I have not find a reas
|
+ EGLExt.eglPresentationTimeANDROID(eglDisplay, eglSurface, timeStampNs); |
+ EGL14.eglSwapBuffers(eglDisplay, eglSurface); |
+ } |
+ |
// Return an EGLDisplay, or die trying. |
private static EGLDisplay getEglDisplay() { |
EGLDisplay eglDisplay = EGL14.eglGetDisplay(EGL14.EGL_DEFAULT_DISPLAY); |