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

Unified Diff: talk/app/webrtc/androidtests/src/org/webrtc/GlRectDrawerTest.java

Issue 1375593002: Android RendererCommon: Refactor getSamplingMatrix() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove unnecessary import of SurfaceTexture Created 5 years, 3 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 | « no previous file | talk/app/webrtc/androidtests/src/org/webrtc/RendererCommonTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/androidtests/src/org/webrtc/GlRectDrawerTest.java
diff --git a/talk/app/webrtc/androidtests/src/org/webrtc/GlRectDrawerTest.java b/talk/app/webrtc/androidtests/src/org/webrtc/GlRectDrawerTest.java
index 99f88a38f00847d70bb012ce677e849b95749009..6fef81b90852f8d59cd5209863841d59a7a515c7 100644
--- a/talk/app/webrtc/androidtests/src/org/webrtc/GlRectDrawerTest.java
+++ b/talk/app/webrtc/androidtests/src/org/webrtc/GlRectDrawerTest.java
@@ -119,9 +119,7 @@ public final class GlRectDrawerTest extends ActivityTestCase {
// Draw the RGB frame onto the pixel buffer.
final GlRectDrawer drawer = new GlRectDrawer();
- final float[] identityMatrix = new float[16];
- Matrix.setIdentityM(identityMatrix, 0);
- drawer.drawRgb(rgbTexture, identityMatrix);
+ drawer.drawRgb(rgbTexture, RendererCommon.identityMatrix());
// Download the pixels in the pixel buffer as RGBA. Not all platforms support RGB, e.g. Nexus 9.
final ByteBuffer rgbaData = ByteBuffer.allocateDirect(WIDTH * HEIGHT * 4);
@@ -168,9 +166,7 @@ public final class GlRectDrawerTest extends ActivityTestCase {
// Draw the YUV frame onto the pixel buffer.
final GlRectDrawer drawer = new GlRectDrawer();
- final float[] texMatrix = new float[16];
- Matrix.setIdentityM(texMatrix, 0);
- drawer.drawYuv(yuvTextures, texMatrix);
+ drawer.drawYuv(yuvTextures, RendererCommon.identityMatrix());
// Download the pixels in the pixel buffer as RGBA. Not all platforms support RGB, e.g. Nexus 9.
final ByteBuffer data = ByteBuffer.allocateDirect(WIDTH * HEIGHT * 4);
@@ -257,9 +253,7 @@ public final class GlRectDrawerTest extends ActivityTestCase {
GLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGB, WIDTH,
HEIGHT, 0, GLES20.GL_RGB, GLES20.GL_UNSIGNED_BYTE, rgbPlane);
// Draw the RGB data onto the SurfaceTexture.
- final float[] identityMatrix = new float[16];
- Matrix.setIdentityM(identityMatrix, 0);
- drawer.drawRgb(rgbTexture, identityMatrix);
+ drawer.drawRgb(rgbTexture, RendererCommon.identityMatrix());
eglBase.swapBuffers();
}
« no previous file with comments | « no previous file | talk/app/webrtc/androidtests/src/org/webrtc/RendererCommonTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698