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

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

Issue 1948473002: 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, 8 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/VideoRendererGui.java
diff --git a/webrtc/api/java/android/org/webrtc/VideoRendererGui.java b/webrtc/api/java/android/org/webrtc/VideoRendererGui.java
index 82417d6afcb2e60fe2971ab156e51a1d2cf502fe..e292bac2ef22f499979d67ff637a47e5d6f7a31e 100644
--- a/webrtc/api/java/android/org/webrtc/VideoRendererGui.java
+++ b/webrtc/api/java/android/org/webrtc/VideoRendererGui.java
@@ -243,7 +243,8 @@ public class VideoRendererGui implements GLSurfaceView.Renderer {
GlUtil.checkNoGLES2Error("glBindFramebuffer");
// Copy the OES texture content. This will also normalize the sampling matrix.
- drawer.drawOes(pendingFrame.textureId, rotatedSamplingMatrix,
+ drawer.drawOes(pendingFrame.textureId, rotatedSamplingMatrix,
+ textureCopy.getWidth(), textureCopy.getHeight(),
0, 0, textureCopy.getWidth(), textureCopy.getHeight());
rotatedSamplingMatrix = RendererCommon.identityMatrix();
@@ -263,10 +264,10 @@ public class VideoRendererGui implements GLSurfaceView.Renderer {
// OpenGL defaults to lower left origin - flip viewport position vertically.
final int viewportY = screenHeight - displayLayout.bottom;
if (rendererType == RendererType.RENDERER_YUV) {
- drawer.drawYuv(yuvTextures, texMatrix,
+ drawer.drawYuv(yuvTextures, texMatrix, videoWidth, videoHeight,
displayLayout.left, viewportY, displayLayout.width(), displayLayout.height());
} else {
- drawer.drawRgb(textureCopy.getTextureId(), texMatrix,
+ drawer.drawRgb(textureCopy.getTextureId(), texMatrix, videoWidth, videoHeight,
displayLayout.left, viewportY, displayLayout.width(), displayLayout.height());
}

Powered by Google App Engine
This is Rietveld 408576698