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

Unified Diff: webrtc/api/android/java/src/org/webrtc/GlTextureFrameBuffer.java

Issue 2524003002: Remove binding framebuffer from GlTextureFrameBuffer.setSize. (Closed)
Patch Set: Add error check. Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/android/java/src/org/webrtc/GlTextureFrameBuffer.java
diff --git a/webrtc/api/android/java/src/org/webrtc/GlTextureFrameBuffer.java b/webrtc/api/android/java/src/org/webrtc/GlTextureFrameBuffer.java
index f1b13bee589655c5f2414617e993d03e9b3b38b5..7e65acefdc0d4046f3c3d194d5370f163374fa07 100644
--- a/webrtc/api/android/java/src/org/webrtc/GlTextureFrameBuffer.java
+++ b/webrtc/api/android/java/src/org/webrtc/GlTextureFrameBuffer.java
@@ -75,25 +75,13 @@ public class GlTextureFrameBuffer {
this.width = width;
this.height = height;
- // Bind our framebuffer.
- GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, frameBufferId);
- GlUtil.checkNoGLES2Error("glBindFramebuffer");
-
// Allocate texture.
GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, textureId);
GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, pixelFormat, width, height, 0, pixelFormat,
GLES20.GL_UNSIGNED_BYTE, null);
-
- // Check that the framebuffer is in a good state.
- final int status = GLES20.glCheckFramebufferStatus(GLES20.GL_FRAMEBUFFER);
- if (status != GLES20.GL_FRAMEBUFFER_COMPLETE) {
- throw new IllegalStateException("Framebuffer not complete, status: " + status);
- }
-
- // Restore normal framebuffer.
- GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, 0);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, 0);
+ GlUtil.checkNoGLES2Error("GlTextureFrameBuffer setSize");
}
public int getWidth() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698