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

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

Issue 1250093003: Add unittest to GlRectDrawer (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: indentation Created 5 years, 5 months 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
« no previous file with comments | « talk/app/webrtc/androidtests/src/org/webrtc/GlRectDrawerTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bb01f78efb493cefc86a42f3fbe71f4c6fa437ef..3e7020db2723e6bec26022940fa8d0192793758f 100644
--- a/talk/app/webrtc/java/android/org/webrtc/EglBase.java
+++ b/talk/app/webrtc/java/android/org/webrtc/EglBase.java
@@ -100,6 +100,10 @@ public final class EglBase {
// Create dummy 1x1 pixel buffer surface so the context can be made current.
public void createDummyPbufferSurface() {
+ createPbufferSurface(1, 1);
+ }
+
+ public void createPbufferSurface(int width, int height) {
checkIsNotReleased();
if (configType != ConfigType.PIXEL_BUFFER) {
throw new RuntimeException(
@@ -108,7 +112,7 @@ public final class EglBase {
if (eglSurface != EGL14.EGL_NO_SURFACE) {
throw new RuntimeException("Already has an EGLSurface");
}
- int[] surfaceAttribs = {EGL14.EGL_WIDTH, 1, EGL14.EGL_HEIGHT, 1, EGL14.EGL_NONE};
+ int[] surfaceAttribs = {EGL14.EGL_WIDTH, width, EGL14.EGL_HEIGHT, height, EGL14.EGL_NONE};
eglSurface = EGL14.eglCreatePbufferSurface(eglDisplay, eglConfig, surfaceAttribs, 0);
if (eglSurface == EGL14.EGL_NO_SURFACE) {
throw new RuntimeException("Failed to create pixel buffer surface");
« no previous file with comments | « talk/app/webrtc/androidtests/src/org/webrtc/GlRectDrawerTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698