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

Unified Diff: webrtc/api/java/android/org/webrtc/GlRectDrawer.java

Issue 1950953002: Revert of Android GlDrawer: Add frame size as argument to draw functions (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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
Index: webrtc/api/java/android/org/webrtc/GlRectDrawer.java
diff --git a/webrtc/api/java/android/org/webrtc/GlRectDrawer.java b/webrtc/api/java/android/org/webrtc/GlRectDrawer.java
index cfadff108a5d81e2f1993f7eb1f3f90d56095e5a..fa821f84fd8e54bd61c63f82fd8ca4a3d4f2a507 100644
--- a/webrtc/api/java/android/org/webrtc/GlRectDrawer.java
+++ b/webrtc/api/java/android/org/webrtc/GlRectDrawer.java
@@ -119,14 +119,13 @@
* allocated at the first call to this function.
*/
@Override
- public void drawOes(int oesTextureId, float[] texMatrix, int frameWidth, int frameHeight,
- int viewportX, int viewportY, int viewportWidth, int viewportHeight) {
+ public void drawOes(int oesTextureId, float[] texMatrix, int x, int y, int width, int height) {
prepareShader(OES_FRAGMENT_SHADER_STRING, texMatrix);
GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
// updateTexImage() may be called from another thread in another EGL context, so we need to
// bind/unbind the texture in each draw call so that GLES understads it's a new texture.
GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, oesTextureId);
- drawRectangle(viewportX, viewportY, viewportWidth, viewportHeight);
+ drawRectangle(x, y, width, height);
GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, 0);
}
@@ -135,12 +134,11 @@
* are allocated at the first call to this function.
*/
@Override
- public void drawRgb(int textureId, float[] texMatrix, int frameWidth, int frameHeight,
- int viewportX, int viewportY, int viewportWidth, int viewportHeight) {
+ public void drawRgb(int textureId, float[] texMatrix, int x, int y, int width, int height) {
prepareShader(RGB_FRAGMENT_SHADER_STRING, texMatrix);
GLES20.glActiveTexture(GLES20.GL_TEXTURE0);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, textureId);
- drawRectangle(viewportX, viewportY, viewportWidth, viewportHeight);
+ drawRectangle(x, y, width, height);
// Unbind the texture as a precaution.
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, 0);
}
@@ -150,15 +148,14 @@
* allocated at the first call to this function.
*/
@Override
- public void drawYuv(int[] yuvTextures, float[] texMatrix, int frameWidth, int frameHeight,
- int viewportX, int viewportY, int viewportWidth, int viewportHeight) {
+ public void drawYuv(int[] yuvTextures, float[] texMatrix, int x, int y, int width, int height) {
prepareShader(YUV_FRAGMENT_SHADER_STRING, texMatrix);
// Bind the textures.
for (int i = 0; i < 3; ++i) {
GLES20.glActiveTexture(GLES20.GL_TEXTURE0 + i);
GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, yuvTextures[i]);
}
- drawRectangle(viewportX, viewportY, viewportWidth, viewportHeight);
+ drawRectangle(x, y, width, height);
// Unbind the textures as a precaution..
for (int i = 0; i < 3; ++i) {
GLES20.glActiveTexture(GLES20.GL_TEXTURE0 + i);

Powered by Google App Engine
This is Rietveld 408576698