Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(591)

Unified Diff: talk/app/webrtc/java/android/org/webrtc/EglBase.java

Issue 1460703002: Implement AndroidTextureBuffer::NativeToI420. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Deleted unused variable Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 e44443baa3b4a93d77e3cb7e35254d4bb0b3cda1..e6df7b570c98abbebec446d6a3d5892bb9802a06 100644
--- a/talk/app/webrtc/java/android/org/webrtc/EglBase.java
+++ b/talk/app/webrtc/java/android/org/webrtc/EglBase.java
@@ -87,6 +87,15 @@ public class EglBase {
EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,
EGL10.EGL_NONE
};
+ public static final int[] CONFIG_PIXEL_RGBA_BUFFER = {
+ EGL10.EGL_RED_SIZE, 8,
+ EGL10.EGL_GREEN_SIZE, 8,
+ EGL10.EGL_BLUE_SIZE, 8,
+ EGL10.EGL_ALPHA_SIZE, 8,
+ EGL10.EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
+ EGL10.EGL_SURFACE_TYPE, EGL10.EGL_PBUFFER_BIT,
+ EGL10.EGL_NONE
+ };
public static final int[] CONFIG_RECORDABLE = {
EGL10.EGL_RED_SIZE, 8,
EGL10.EGL_GREEN_SIZE, 8,
@@ -247,6 +256,19 @@ public class EglBase {
}
}
+ // Ensure we have a pixel buffer surface of the right size.
+ public void withPbufferSurface(int width, int height) {
perkj_webrtc 2015/12/10 10:15:53 I would prefer if put this this helper method wher
nisse-webrtc 2015/12/10 12:14:56 I'll delete this method and inline the logic where
+ if (hasSurface()) {
+ if (surfaceWidth() == width &&
+ surfaceHeight() == height)
+ // We already have a surface, and of the right size.
+ return;
+
+ releaseSurface();
+ }
+ createPbufferSurface(width, height);
+ }
+
public Context getEglBaseContext() {
return new Context(eglContext);
}

Powered by Google App Engine
This is Rietveld 408576698